Introducing EntityChangeFactory.

This reduces usage of global state, and allows for easier integration
of redirects.

Bug: 65594
Change-Id: I2bc309ba09e6eca4fc05055ab5c8d13aa94c1625
Merge "Introducing EntityChangeFactory."