nix-bench: add foundations for benchmark tool

Incomplete and lots of room for improvements, but should work.