Improving locking, caching
- Remove last usage of
Utilities.formatString, in favor of string concatenation. - Improve the locking logic, so that locks aren't obtained in cases where a token refresh isn't possible.
- Cache null tokens, to avoid excessive hits on the
PropertiesService.