Make more code visible to code coverage analysis.

Simplecov can only analyze code in files required after it starts. As a result,
any code in the file where simplecov is started won't be analyzed. Some of our
most important code was thus being missed, so we move it to a separate file
that we then require.