Finish basic functionality of Funk.Module module

As part of case #5, finish basic functions for storing
declarations and definitions in Modules. The only goal for module
support at this phase is to just treat source files as modules and
allow declarations from one modules to be imported into another.
This will allow files that call functions from other files to be
compiled and linked.

This commit includes haddock documentation and tests for
Funk.Module and so is also part of case #2.
Fix bug in Funk.Module.getFunctions and renamed to getDefs

The unit tests for Funk.Module revealed that getFunctions was
returning definitions for functions that should have only had
declarations. This commit fixes that bug and also renames
getFunctions to getDefs, to distinguish it from getDecls.
Refactor main module

Cleaned up/refactored the main module which had kind of just had
things hacked onto it as needed to test the other modules. No
change in functionality.