Attempt at fixing out of memory error - fixed closing of some streams.
Merge branch 'feature/query-service-refactor' of github.com:zenoss/query into feature/query-service-refactor