issue 203: test json_last_error() after json_encode() or json_decode()

From WCNY hack day. A couple notes:

* I gave the option of translation for the range of potential error messages. Probably overkill.
* Do you think it's worth being so specific with the error messages or would just a blanket "There was an error with json_encode()" suffice?
* Also probably overkill to test `defined()` for each PHP JSON constant instead of just a switch statement. 

Happy to revise as needed.
For the message, this should use `sprintf( __( 'JSON encoding error: %s' ), $json_error_message )` - The stuff inside `__( ... )` has to be completely static.