Feature #78 Query Executor - Added support for storageSize, totalIndexSize and aggregate.

...ze, aggregate

Refactored js code.