Unfortunately we can't test this properly until we have something using container to do a deployment, which won't happen until the uniter integration branch (https://codereview.appspot.com/6497109/) is merged.
We also add a Unit.AgentName method, meaning that we can use the same logic in various places that need to calculate an agent name from a unit.
We also change the path where unit data is stored ($vardir/agents/unit-agent-name) so that any other agent data can have an entry in the agents directory too.