Support for GROUP BY and ORDER BY for queries

Also, added support for ORDER BY in collections.
Close connection in test cases to avoid running out of connections
Test coverage for GROUP BY and ORDER BY
Small cleanup of `use` statements
Merge pull request #34 from dhotson/group-order-by

Support for groupBy and orderBy on Query object and orderBy on Collection