Move unit tests in to dedicated directory.

This moves all of the unit testing infrastructure and fixtures from `tests` to
`tests/unit` in order to separate them from the new functional tests.

Also, some reformatting (but no functional changes) in the `render.js` test
harness.