Http Server: Returned error messages should be json objects

When using exception to indicate an error message, the return body
should be a json object.

This patch uses a json helper class to translate an exception to a
formatted json object.

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>