Fixed refresh token.

This fix corrects two things. Firstly, it corrects a bug in
scheduleRefresh where the current scheduled token id was being
compared against a function, resulting in a permanent false.
Secondly, it adds promise-checking to tryRefresh, so that the
system will never issue more than one token refresh request at
a time.

This should address intermittent logout issues in storyboard.

Change-Id: Ie929b061ab1389c21e9c1bfdf4d580b85a778832
Merge "Fixed refresh token."