More functional interface for compression.js.

Also added a bunch more tests. Am still debating the style of tests to
use, for example whether to test the method parameters or not.
Currently, I'm leaning towards not doing so for internal methods, but
possibly doing so for anything that takes direct "user" input.
Added timer data to the logging.

This is helpful for tracking application performance.