added addOnPreRun and addOnPostRun

Added Module['addOnPreRun'] and Module['addOnPostRun'].

I also adjusted the preRun / postRun functionality to be in the same style as the init, preMain and exit code. Aside from `addPreRun` being changed to `addOnPreRun`, I don't think any of that risks breaking any compatibility.

As a side note, it seems preInit can be removed, as it currently appears to serve the exact same purpose as preRun. It also seems to make sense to execute preRun, init and preMain events in order instead of reverse order as I mentioned on IRC (perhaps that has something to do with why both exist?).

Ran o1, asm2 and other tests.