Logging api

Refactorings to support testing logging interface. @bernerdschaefer @peterbourgon 
`containerInstance agent.ContainerInstance`