Fix cast and quotes issues with 1.2

* Handle quotes depending on cassandra and cql version
* Fixes tests from 1.0 to 1.2 in CQL 2 and 3