github authz: improve caching, add test
Created by: beyang
- The GitHub authz provider now treats cache entries as invalid if the TTL associated with the cache entry is greater than the TTL of the authz provider (this would occur if an admin changes the
GitHubAuthorization.ttl
config field. - Caching behavior is slightly improved. Before, the authz provider would issue API requests checking if user X had access to repo Y before checking if there were cache entries indicating repo Y was public. Now it checks the cache for both types of entries ("user X can access repo Y" and "repo Y is public") before issuing any API requests.