This changes openbadger.js and api.js such that openbadger now
uses api, and the app only has to use openbadger. api(openbadger.x)
calls now look like openbadger.middleware('x'), and otherwise
the same methods are exposed on the openbadger object.

Note that this means api.js has a new usage as well. If you create
a new api, e.g.
  var api = new Api('ORIGIN');
you will have an object with all the get/post/head/etc. helpers
that could also be used if you want to fetch data from an API
without the layer of abstraction that providing additional functions
gives. This usage isn't well tested.