src: create new benchmark api and convert existing

The new benchmark/_bench_test.js has a generalized api for creation and
use of benchmarks. How this can be used is well documented at the head
of the file.

New micro benchmarks have been introduced to test each smallest possible
piece of functionality. Existing benchmarks have been converted to use
the new api, where applicable. They have also been organized into
folders by api category.