Ensure `-` == `_` in header names
Parse JSON parameters from the request

Adds JSON parameters to the request data, but parses them as late as
possible to avoid performance issues.
Use offsetExists for checking parameter existence
Fix error checking logic
Make canonicalize_header_name public and static

This doesn't rely on request state, plus it's easier to test this way.
Add tests for the request object
Add method to get JSON parameters
Merge pull request #626 from WP-API/two-parse-json-data

Parse JSON data from the request