Replace deprecated function calls to `wpdb::escape()` and `like_escape()`

`wpdb::escape()` is deprecated since WP 3.6
`like_escape()` is deprecated since WP 4.0