Constrain mkdir calls to avoid extra mkdirs

This updates the calls that make the subdirectories for objects
to use a base directory above which git_futils_mkdir won't walk
any higher.  This prevents attempts to mkdir all the way up to
the root of the filesystem.

Also, this moves the objects_dir into the loose backend structure
and removes the separate allocation, plus does some preformatting
of the objects_dir value to guarantee a trailing slash, etc.
Add O_CLOEXEC to open calls
Fixed most documentation header bugs

Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode.

The following warnings have not been fixed:
common.h:213 - Not sure how the documentation format is for '...'
notes.h:102 - Correct @param name but empty text
notes.h:111 - Correct @param name but empty text
pack.h:140 - @return missing text
pack.h:148 - @return missing text
Work around reparse point stat issues

In theory, p_stat should never return an S_ISLNK result, but due
to the current implementation on Windows with mount points it is
possible that it will.  For now, work around that by allowing a
link in the path to a directory being created.  If it is really a
problem, then the issue will be caught on the next iteration of
the loop, but typically this will be the right thing to do.
Merge pull request #1669 from arrbee/fix-index-add-bypath

In loose objects backend, constrain mkdir calls to avoid extra mkdirs
Merge pull request #1670 from arrbee/open-cloexec

Add O_CLOEXEC to open calls
Merge pull request #1672 from TheRealKerni/fix/header_docs

Fixed most documentation header bugs
Fix checkout tests on Windows
Fix a leak in the local transport code.
Merge pull request #1674 from arrbee/fix-checkout-target-dir-win32

Fix checkout tests on Windows
Merge pull request #1675 from arthurschreiber/fix-leak-in-local-transport

Fix a leak in the local transport code.
test-rename: This is not a decimal, silly
libgit2 v0.19.0 "gut merge"

Minor point release! We got a lot of rather large features that we
wanted to get settled in:

- New (threadsafe) cache for objects
- Iterator for Status
- New Merge APIs
- SSH support on *NIX
- Function context on diff
- Namespaces support
- Index add/update/remove with wildcard support
- Iterator for References
- Fetch and push refspecs for Remotes
- Rename support in Status
- New 'sys/` namespace for external headers with low-level APIs

As always, this comes with hundreds of bug fixes and performance
improvements. We're faster and better than ever. And we haven't broken
many APIs this time!

Build stuff.
Merge branch 'development'