initial check in of base_query_handler unit tests
Lots more changes