Instrument Energy2D code using performance.js and refactor benchmarks

They use the same pattern as MD2D benchmarks now.