Fix #14; add doctests

This required reodering goals on installation for me. I'm not sure if
that's generally necessary.

Also I had to relax the version constraint on Criterion. Not a big deal.