oauth2: Clean up

Simplify the maze of nested if-else branches and multiple return sites.

Fixes: https://bugzilla.gnome.org/710363
oauth2: Adapt to changes in the redirect URI used by Facebook

Once the user has logged into the embedded web view and granted
permissions, Facebook tries to redirect us to an URI of the form:
  <get_redirect_uri>?#access_token=...

Earlier this used to be of the form:
  <get_redirect_uri>#access_token=...

This confuses the navigation-policy-decision-requested handler to think
that Facebook is using the query part of the URI to return the
authorization code, which we will exchange for the access token. In
reality Facebook is still using the fragment to directly give us the
access token.

Therefore, lets first look at the fragment, and then the query.

According to the OAuth2 specification, the error is always passed in
the query component of the URI. So, if we failed to obtain the
authorization code or the access token, we should look at the query to
ascertain the cause of the error. See 4.1.2.1 for more information:
https://tools.ietf.org/html/draft-ietf-oauth-v2-23

Fixes: https://bugzilla.gnome.org/710363
facebook: Update README

Fixes: https://bugzilla.gnome.org/710363