Fix tests broken by latest merge
Trying to separate api util methods from actual OpenBadger API calls
so utils can be reused for other APIs too, like Aestimia. This also
helps a little bit with testing to avoid testing e.g. pagination
fully on every paginated endpoint (although having a small sanity check
is still advisable).
Remove api method lookup by name
Bring openbadger into closer conformance with v2 badge endpoints
Test explicitly for correct v2 badge endpoints
Pull openbadger url from env, and fix a few tests
Incorporating /v2/program and /v2/programs endpoints, and
refining badge endpoints. The program endpoints currently
do not return enough data from the OpenBadger side to fully
build out their pages. I'm also not sure about the controllers
organizational strategy, and whether I'm breaking it. Changing
site main navigation and major endpoints to "Earn, Learn, Level Up".
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.
Error out if trying to paginate unpageable data
Merge pull request #246 from stenington/api-v2

[WIP] Talking to OpenBadger v2 API
A start at standardising error handling
Using new error handling
Using new error handling
Don't need logging here
Adding `new`s.
Adding another `new`
Merge pull request #252 from andrewhayward/error-handling

Merging error handling, with the caveat that @stenington will fix the tests that this will break.
Merge pull request #250 from coryshaw/master

Template Updates
Updating tests to pass with new error handling, and
fix issues uncovered in the process.
Merge pull request #254 from stenington/error-handling-tests

Error handling tests