Added ReQL time functions and fixed a bug with the decoding of structs in results
Fixes for typos and query debugging
Added aggregation count test and fixed bugs with control queries