Repository enhancements

I've added some useful methods that were missing:

* ```is_shallow()```
* ```state()```
* ```state_cleanup()```

It's a little bit hard to test all possible values that ```state()``` may return as we do not support merging etc. yet. The ```state_cleanup()``` method is tested by "touching" one of the files that is supposed to be cleaned up. Again, when we have merging the test can be improved.