USERGRID-2670 restore JSON formatted error responses 

My recent error handling caused some error responses to be returned as plain text instead of JSON. This PR fixes that and provides a test for the duplicate email in organization failure case.