Add libpack implementation for State

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Add tests for GitState

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Fix build errors in GitState

Signed-off-by: Solomon Hykes <solomon@docker.com>