HasParentQuery/Filter, tests

* Added has_parent query and filter
* Added tests for both has_child/has_parent query and filter