(bug 45099) Return full error report from API.

This generalizes entity saving and error handling in the API.
By this, consistency is improved, redundant code is reduced,
and error reporting is greatly improved.

There are some design issues here pending discussion, especially
in regards to moving from inheritance based code re-use towards
a composition based model. This change does not solve these issues,
but should make any future refactoring easier, and is thus a step
into the right direction.

patchset 9: rebased and solved conflict in ClaimSaver.php

Change-Id: I4094feee1e6166171fd15ffdf7249b3c0d27ce1c
Merge "(bug 45099) Return full error report from API."