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>