Unify duplicated code about client/server code
Lots of code is duplicated about the api client and server code. All classes which expose an internal api are concerned: storage, objstorage, vault.
There are lots of warnings in that code which is also duplicated. Unify this code.
Migrated from T646 (view on Phabricator)