[rql2sql] Boolean values should be substitued like others. Closes #2829481
Furthermore lgdb 1.10 deprecate boolean_value method and this simplify
testing.
[toward-py3k] rewrite __cmp__ (closes #2715115)
In Python 3k `__cmp__` special method is no longer supported. So we split
it in `__lt__` and `__eq__`.
details on Python3k behavior here:
http://docs.python.org/3.0/whatsnew/3.0.html#ordering-comparisons