add checkout function
Fix issues raised in review.
Enums aren't typed.
Fix the HEAD selection code.

This allows both checkouts of references and commits. I'm not sure about tags though…
Tests + fixes because tests failed.
Clarify the typedefs.
Typedef the blocks.
Move the parameters around + documentation.

Because it feels better to have blocks at the end.
Add a convenience wrapped if notifications are not wanted.

And use that in tests.
Typo + indentation.
Another wrapper if you really aren't interested in blocks.
Indentation.
Merge branch 'master' into checkout
Merge branch 'master' into checkout

Conflicts:
	ObjectiveGitTests/GTRepositorySpec.m
Review.
Merge branch 'master' into checkout

Conflicts:
	Classes/GTRepository.m
Split checkout depending on target type (commit or reference).
Merge branch 'master' into checkout

Conflicts:
	Classes/GTRepository.h
	Classes/GTRepository.m
	ObjectiveGitTests/GTRepositorySpec.m
Merge pull request #223 from libgit2/checkout

Checkout support.