Clean up client->query event delegation
Semi-colons
Accept anything with function 'submit' as a query

This allows for passing in custom objects which conform to the query API
Merge pull request #457 from brianc/query-stream

Clean up internals