Escape database name and prepare for drush HEAD

 * Escape database name.
 * Use `drush_sql_conf()` instead of `_drush_sql_get_db_spec()`.
     `_drush_sql_get_db_spec()` is removed in current HEAD of drush.
 * Code style cleanup.