benchmark: rewrite api, update tests

The _bench_timer.js api has been heavily extended and all tests that use
it have been updated. Additions to the new api have been well documented
in the header of the file.