Refactor api wrapper

Now M.require( 'api' ) returns an instance of Api object, which has an
additional abort() function that aborts all the requests. You can
sandbox requests by creating a new instance of Api (which can be
accessed by M.require( 'api' ).Api).

Api can also be extended (Api.extend( { ... } )) to create a child
object, similarly to View.

Change-Id: I7f16fc14825cbc709ce7d812c85aeabbb71118c0
Merge "Refactor api wrapper"