Extract the manager to its own file.

It's going to get bigger when we add the revision checking and locking.

Change-Id: Iff26ba9c9416b3d6e705f5b0b90482c2ec13a3b1