[Compiler] Gather data about properties in modules
This is not yet fully working, but a development snapshot.