Offline fallback for API requests

Will reject an API request if the browser knows we're offline.
Won't actually help if the network dies after the request is
fired off though -- we'll never get a return from the JSONP
callback.