Improve assertion messages in Module finalization.
Improve assertion messages in Module finalization.

When an object being finalized references an object declared as needing
a definition, the definition needs to be available. Add asserts to catch
this specific case.

stoklund/cretonne,stoklund/cretonne,stoklund/cretonne