remove dependency on pool_allocator
make sure resources in schema are indexed
remove memory leak and fix query parsing bug