Finishing up of benchmarking code

Starting splitting it off into a separate library.  Doesn't compile with
correct metadata yet.

Also fixed bug with bubble sort implementation.