modified cql_quote() again, but it really needs to be refactored to handle collection types properly