Merge pull request #421 from wolfmanjm/upstreamedge

cleanup modules cleaning up
clean up the way events are handled and use std::function
don't use std::function as it uses a lot more memory than Module*
just expand events.h, leave the rest the same, just a readability issue
add some comments
Merge pull request #422 from wolfmanjm/fix/module-event-arrays

make the event callbacks and definitions more readable
Update Module.cpp
Public data does not need to be a module  or have an instance, it is just a library.