Update ajax.php to remove deprecated escape call

Updated ajax.php to use wpdb::prepare, as well as including LIKE %% so post titles don't have to match exactly.