Moving agent's code into a new vttablet library.

I will need to change it soon, might as well move it first.