Rest API error responses

* Adds an exception mapper to rest project to catch unexpected exceptions and send a JSON response back.
* Treats ClassCastExceptions in the rest project as invalid inputs from the client (e.g. a String value for an Integer sensor) and responds 400 Bad Request. Is this contentious?