Fix permission on relog

Previously the `permissionGranted` attribute was set only in `userAuthorizationURLWithRequestToken:requestedPermission:`. But this method is not called when using `checkAuthorizationOnCompletion:`. Thus, requests that require write or delete permission failed when using a token from a previous authentication procedure.

This pull request stores the `grantedPermission` attribute along with the auth token in the NSUserDefaults, and restores it when `checkAuthorizationOnCompletion:` succeeds.