Separate helper functions

Moves helper functions from the `WP_JSON_Server` object to the global namespace, where they should belong.

Fixes #185.