Add caching for consent data.

Review Request #9936 — Created May 15, 2018 and submitted — Latest diff uploaded

Information

Djblets
release-1.0.x
8a5217c...

Reviewers

Fetching consent data from the consent tracker now first checks the
cache, querying the backend only if not found there. The cache is
cleared any time a new consent decision is made, ensuring we're not
dealing with stale data. This makes consent querying much faster,
particularly when needing to query many users on the same page.

Unit tests pass.