Add accessor for orphaned HEAD.
Clarify documentation on `isHeadDetached`.
Use `git_repository_head` instead of going through GTReference.

This is equivalent, but has a special error code for orphaned HEADs.
Merge branch 'master' into stuff
Add private `-lookupByGitOid:` to GTRepository.
Fix error code/domain when initing GTRepository with bad URL

Previous error used a code from kCFErrorDomainCFNetwork, but constructed
the error in NSCocoaErrorDomain.
Add method to initialize bare repositories

Also report an error if the passed URL is bad.
Add test for init bare repository
Capitalization.
Change the property name.
Clean up diff options struct management

Instead of requiring callers to remember to call +freeOptionsStruct:,
have callers pass in a block, so cleanup happens automatically once the
block returns.

Then, since the struct doesn't have to outlast the method, just use
stack allocation of the git_diff_options (and the enclosed git_strarray
if necessary), so no explicit cleanup code is required.
Merge pull request #230 from libgit2/stuff

Some changes I gathered while working
Minor style fix
Merge pull request #227
Convert repository initialization tests to Expecta
Merge pull request #229 from jmah/diff-options

Clean up diff options struct management (shuts up static analyzer too)
Merge pull request #228 from jmah/init-bare

Add method to initialize bare repositories