refs #1627 : bugfix: mysql_escape_string when disconnected.

 - Before MySQL connection, escapeString uses mysql_escape_string.
   First escapeString call happens when TC loads default blog
   settings from pageCache.
   For next versions, we strongly recommend using MySQLi adapter.
   (mysql will be deprecated after PHP 5.5)