Copy git_merge__bases_many() for new ahead-behind code

To be used as a basis for a function which marks nodes with parents
up to the merge base.
Morph copy of git_merge__bases_many() -> mark_parents()

Integrate mark_parents() with the ahead_behind() code.
Fix no_common_ancestor test for ahead_behind count

Ahead-behind count is still a valid operation, even if the two
commits don't have a common merge-base. The old implementation was
buggy, so it returned ENOTFOUND. Fixed now.
Fix mark_parents() to account for bad luck traversals

If commit timestamps are off, we're more likely to hit a traversal
where the first path ends up traversing past the root commit of the tree.
If that happens, it's possible that the loop will complete before the second
path marks some of those final parents. This fix keeps track of the root
nodes that are encountered in the traversal, and verify that they are
properly marked.

In the best case, with accurate timestamps, the traversal will continue
to terminate when all the commits are STALE (parents of a merge-base), as
it did before. In the worst case, where one path makes a complete traversal
past a root commit, we will continue the loop until the root commit itself
is marked.
Fix a bunch of leaks, error handling cases
Merge pull request #1131 from libgit2/correct-ahead-behind

Fix an issue with ahead-behind for lopsided traversal
git_mwindow_file_deregister() shouldn't return errors

As a function that appears to only be called on error paths, I don't
think it makes sense for it to return an error, or clobber the global
giterr. Note that no existing callsites actually check the return
code.

In my own application, there are errors where the real error ends
up being hidden, as git_mwindow_file_deregister() clobbers the
global giterr. I'm not sure this error is even relevant?
Merge pull request #1194 from libgit2/dont-clobber-errors

git_mwindow_file_deregister() shouldn't return errors
Allow to clone repositories that don't have a `master` branch

Before this, we error out from `reference_matches_remote_head` if the
reference we're searching for does not exist.
Since we explicitly check if master is existing in `update_head_to_remote`
and error out if it doesn't, a repository without master branch could
not be cloned.
In fact this was later clobbered by what is fixed in #1194.

However, this patch introduces a `found` member in `head_info` and sets
it accordingly. That also saves us from checking the string length of
`branchname` a few times.
travis: Include the online suite when running against Travis
clone: Fix a memory leak
tests: Fix some memory leaks
reset: Fix a memory leak
Merge pull request #1197 from nulltoken/travis/run-online-tests

travis: Include the online suite when running against Travis
Merge pull request #1196 from scunz/allow_clone_without_master_branch

Allow to clone repositories that don't have a `master` branch
travis: Only run Valgrind when all tests pass
Merge pull request #1198 from nulltoken/travis/run-valgrind-on-success

travis: Only run Valgrind when all tests pass
Tab align value of GIT_FILEMODE_BLOB_EXECUTABLE
Revert "Tab align value of GIT_FILEMODE_BLOB_EXECUTABLE"

This reverts commit 47fbcbb5a8d4aad87371a381ebdadd04cde3fb2b.
Correct typos in documentation