should not block if resending token operation is sync operation

The "notify" signal is missed if the resending token is synchronous operation (which is true in current app service), so the first time the credential manager asks the app service for the user's token will always block for a period of time (the default timeout is about 10 seconds). We can set the timeout to zero, but there is still a risk the "notify" signal is missed if the wait method has not been reached when the "notify" signal has been triggered, then the waiting period still applies.

@jypma 
maybe move this inside the `synchronize` block, in case two concurrent calls are causing the credentials to be retrieved.