add --random-last option to use the seed from the previous run

this should make it easier to track down isolation issues
refactor tests to use a fixture to set up the sample tests and parse the output of test runs more robustly

this should hopefully make the tests easier to read, too...