Implement casts for more basic data types in QueryInterpreter.

Fixes issue #664. Test in AggregateTest.testGroupBy.
Merge pull request #667 from slick/tmp/interpreter-more-casts

Implement casts for more basic data types in QueryInterpreter.