Refactored some of the testing code to support query_php.py tests, added space-trimming to "in" operator, refs: geomoose/geomoose#35