improve error handling for rest handler baseclass,
use midcom constants for http status codes,
actually use the provided status code in json/xml responses