Cast lvalues to rvalue type during most comparison operations

This leads to better numeric and date comparisons, since we are comparing
actual types and not strings.
Merge pull request #72 from azavea/cast-lvalues-to-rvalue-type

Automatic type cast in lookup queries, thanks to @maurizi