pf: getstates: avoid taking the hashrow lock if the row is empty
Reviewed by: mjg
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30946
(cherry picked from commit a19ff8ce9b58548a5f965db2c46eb03c38b15edb)