Initial attempt at optimizing has_child query.

Short-circult bitset iterations once all parents have been found.
Add more has_child tests.