[server, hooks] allow callable in dbh.TYPE_MAPPING
This is necessary for cubes introducing new custom final types whose generated
sql may depend on some extra configuration, avoiding ugly-buggy hack as done
currently by the postgis cube.
Closes #7569998
[migration] consider extra_props in rdef created during attribute creation hook
else we may miss important data such as type parametrization (see
postgis.Geometry for instance).
Related to #7569998