Rewrite init_repository using cffi
init_repository now wraps git_repository_init_ext

Fixes #347
travis: test 3.4 too
Correct LIBGIT2_VERSION name and add documentation

LIBGIT2_VERSION was previously recorded as LIBGIT2_VER_VERSION which is
incorrect.

We also add basic explanations to all the constants so that the page is
a little less bare. Perhaps this should be done as autodoc style
comments in the code but I guess not.
Provide a doc example for discover_repository

To clarify the behaviour and usage.
Explain that reference targets are writable

It might seem like a really obvious point to make but without
emphasizing it, it isn't completely clear. I would like to mention this
in the Branch section as well for how to point a branch at another
commit but I can't see how to smoothly slide it in.
Fix spelling typo
Provide example for Reference.log_append

I would have found this useful when trying to do reflog additions. It
might not be massively complex but examples always help.
Merge remote-tracking branch 'michaeljones/documentation'
Index: add a setter for workdir
support setting a detatched HEAD