test(benchmark): add test runner and stubs for bp.js

This commit adds a karma setup with a spec file for bp.js, and
has refactored bp.js to expose all functions on a global "bp" object.

Behavior of functions hasn't changed, other than to remove some
duplication of code regarding adding buttons to the DOM.