avoid encoding issues with MySQL's quoting methods

- #quote_string did not preserve encoding - actually it was "mysql" gem compatible but that was probably not the intention, new "optimized" Java impl now preserves encoding but as it tries to behave "mysql2" gem compatible it will change the encoding (of e.g. ASCII-8BIT) to UTF-8 on 1.9

- #quote (re-)borrowed from Rails's MySQLAdapter code with our :primary_key column check for backwards compatibility

- #quote_column_name and #quote_table_name moved to the Ruby side with string value caching similar to the Rails native adapter, except that we're freezing strings to avoid potential hard to track bugs if someone tries to modify such quoted string

closing #185