Add recovery handler which outputs JSON

Also add tests for error documents.
Merge pull request #17 from jabley/json-api-recovery

Add recovery handler which outputs JSON