core: commit any changes from Module:manage_schema before handling the #datamodel. Not committing the the transaction locks the rsc table if a new fk constraint to the rsc table was created.

(cherry picked from commit ca0b5a87d3bac8ddf77b1bfc50f9dc55f087ad72)

Conflicts:
	src/support/z_module_manager.erl