Source module interface changes

This should be merged in after #1007 is accepted.

Refactoring to SourceModule implementations and interface so 'define' and 'use' time dependencies are treated separately.

<!---
@huboard:{"order":1010.0,"milestone_order":1010,"custom_state":""}
-->