Move compatibility-related functions to a new include file.

Also replace current_action() function with identical current_filter().
The former was introduced in WP 3.9, and was causing some people's sites
to fatal because they were using an older version.