Define more shared update document subroutihandlers.
Implement feat.models.model.put() helper.
Fix traceback when starting agent fails.
Fix FEAT_DEBUG_MESSAGES switch.
Revert "Correct assertation after handling more gracefully resource not found error."

This reverts commit 293406ea98c199373dfa772763e94680f25c745c.

I revert this, because it turns out that my fix broke rendering error pages
with the correct mime type.
Fix correctly the backtrace webserver is rendering an error payload to a
mimetype which is not handled by a servers registry.

The old fix broke rendering NotFound page into the correct mime type.
Make it possible to inherit the document registry.
Add missing parts of previous commit.
Encode attachment body only if its a unicode string.
Don't log traceback for model related errors.
Define 422 http response code.
Cancel and reset inactivity timeout correctly in http client.
Merge branch 'master' into release-0.24.x