Updated deprecated function WPDB::escape

WPDB::escape has been deprecated for security reasons. More information
here:
http://wordpress.org/support/topic/wordpress-36-rc2-last-minute-wpdbescape-deprecation-is-not-nice

404 Redirected was throwing the following:
Notice: wpdb::escape is deprecated since version 3.6! Use
wpdb::prepare() or esc_sql() instead. in
/var/www/html/wp-includes/functions.php on line 2919

Replaced all instances of 'wpdb->escape' with 'esc_sql' as suggested.
Since this is a pretty straight forward matter of replacing one escape
function with another, there shouldn't be any issues, but based on some
light testing, the plugin seems to be working properly and the notice is
gone.
Revert "Updated deprecated function WPDB::escape"

This reverts commit a1240c2f0ee379f7e2550c979d3839b4b9399895.