Make a difference between entity serializers used to serialize data for storage…

Authored by WMDE-leszek on Mon, Sep 11, 12:56 PM.

Description

Make a difference between entity serializers used to serialize data for storage, and to serialize it tu output to outside world

This change does not matter much for current way items and properties
are serialized (the same format stored in the DB and presetned e.g.
in API results), although there are already places which state
in comment there is not guarantees given. This might matter
for extensions adding custom entity types that contain data
that must be stored but should not visible to data user.

And in general, consumers of data provided by Wikibase should
not be make any assumption on correspondence between
what user get e.g. from API and what is persisted in the
internal storage.

Change-Id: Ifaeb8048cf4120744b85bcf325379157da6a01a6