Implement git_repository_set_head(_detached)

This closes #88

Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>