Use test methods instead of functions

Using methods allows us to track some state while running tests.  This
means we don't have to manually track test numbers.  It also means we're
structurally similar to Go's testing package so that we can emulate it.
That should make it easier to port a test from testing to tap.