[BUGFIX] Implement case-sensitivity switch for Query::equals()
That was left as a todo and never done. Now it is possible to check
case-insensitive. Checking case-sensitive works depending on database
support, it can only be done if the database allows for case-sensitive
The change also trivially solves a todo about NULL checking in equals().
Releases: master, 2.0