Reuse cached RefControl data in FunctionState

Currently the FunctionState code is run for every change in a
change listing in the web UI, or the user dashboard. Looking
up the relevant permissions for each reviewer is costly, but
can typically be cached and reused off the request's cache,
as most changes are not on username specific references.

Change-Id: Idff421e1eecf651db11549d6591484578cd9543c
12 files changed