[adapters] Use an adapter for serializing entities to a bare python structure
which may be used for e.g. JSON export or other and allow to have different
serializations for each entity types.
Closes #6378035
sql('DROP FUNCTION IF EXISTS _fsopen(bytea)')sql('DROP FUNCTION IF EXISTS fspath(bigint, text, text)')