Inject access to entities into EntityView.

This greatly reduces the reliance of EntityView on global state
and thus allows tests to instantiate EntityView in isolation.

Change-Id: I34717dedd7095e64c32728868a8c0b06af40475c
Merge "Inject access to entities into EntityView."