pf: fix pf_map_addr() not to cause dividing by 0
This fixes problem when using table or dynamic interface addresses for
source-hash. Also avoid calling arc4random_uniform() with upper_bound == 0.
ok mikeb
Obtained from: OpenBSD, yasuoka <yasuoka@openbsd.org>, c30ec822b8
Sponsored by: Rubicon Communications, LLC ("Netgate")