Cleanup in EntityRevision related code

This is mostly a follow-up for If091211c1d1d9ab62dd04f23ec6df6cc5f3ffebb.
I found some actual typos and such. Most of the code I touched is kind
of old.

Yes, this combines many unrelated changes. If you think a specific
change is scary or needs a test then please tell me and I will move it
to it's own patch.

Change-Id: I0f28a2e2469f3656d44dc87939581eea7de913c8
Merge "Cleanup in EntityRevision related code"