pf: factor out state allocation into pf_alloc_state
Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate")