Break apart test options, runner and display

For #711, the test runner will execute in a web worker, but test results will be
displayed in the parent page or a shell. So, it is convenient to break the
options parsing, test running, and results display into their own modules for
reuse by other runners.

# Verification

- `npm test` should work
- `test/runner` should work
- `test/runner -v -s level1/core` should work