Refactor discovery code to use promises

This PR changes `RemoteStorage.Discover` to use promises instead of a callback. After this the only two places where callbacks are still used will be (if I grepped correctly), in readBinaryData and in the calls to IndexedDB (whose API we don't control).

It also changes the function signature of `remoteStorage.remote.configure` from having lots of separate arguments, to having an object with fields.

It also adds and updates some docs, and adds a test that was missing.

I can't run the tests locally atm, but let's hope Travis can :)