splitting up runner.py

Last night I was toying with splitting off the sock tests into their own Python script, and then I kind of went off the deep end and split off all of the main test suites in runner.py currently.

There were no changes to the tests themselves (except a sanity test that checked the error message when no tests were found), however, there were some changes to the shared.py Settings code and to the setup code for each test suite. As well, a new BrowserCore was created for use by both the browser and socket tests, and a few functions such as do_run got moved into RunnerCore so they could be re-used from outside of the core and other tests.

A good place to start reviewing would be at the bottom of runner.py:
https://github.com/inolen/emscripten/blob/test_split/tests/runner.py#L658

runner.py no longer use unittest's main() helper function. Instead of running any test that's evaluated, it now searches for any module in the `tests/` root matching the pattern `test*.py` for classes representing the command line arguments and executes them manually.

Regarding the shared.py Settings changes, I have to admit I'm a bit fuzzy on it all, as I don't know Python that well. From what I saw, each module that was importing shared.py was getting a new instance of the Settings object. I've changed it in a few ways to a.) make it a singleton shareable across modules and b.) took advantage of __getattr__, __setattr__ and Python's metaclasses to make getting / setting Settings.MYSETTING actually map to modifying the MYSETTING key in an internal dictionary (https://github.com/inolen/emscripten/blob/e7dfc1c96978a4422324b7502d8c83d6c64c608d/tools/shared.py#L735) which made it easy to reset its state.

Finally, some of the setup code for each suite got moved around a bit (as to not be evaluated immediately upon import), such as the benchmarking code in https://github.com/inolen/emscripten/blob/test_split/tests/test_benchmark.py. I've ran the suites (well, not every variation of the core tests) and they all seem to work as is, but I'm sure it's possible I've missed an issue or two.

Also, there was a nasty hack I made to share one of the globals determined from the command line with the test modules that I'd like a review on as again, I don't know much about Python:
https://github.com/inolen/emscripten/blob/979fff5d252585f4be7b66f45e53caa6bfd7cddb/tests/runner.py#L659