[IPv6addr] Merge duplicated code from find_if() and get_if() into scan_if()
I notice that find_if() and get_if() share a non-trivial amount of code.
The only difference between these two functions is that the latter
constructs and uses a mask, whereas the former only looks for an exact
match. By creating a new function scan_if(), with a switch telling
it weather or not to construct a mask based on the prefix - the default
mask is all 1s, or in otherwords an exact match - the code
duplication is removed.
--HG--
extra : convert_revision : aec55b384434ed099113384a59971ae73ec2de5e