tree cache: loosen negative entry count check

While C Git has been writing entry count -1 (ie. never other negative
numbers) as invalid since day 1, it accepts all negative entry counts
as invalid. JGit follows the same rule. libgit2 should also follow, or
the index that works with C Git or JGit may someday be rejected by
libgit2.

Other reimplementations like dulwich and grit have not bothered with
parsing or writing tree cache.
Merge pull request #1136 from pclouds/tree-cache-counts

tree cache: loosen negative entry count check
Allow creation of dangling remotes
API to set a dangling remote's repository
don't walk off the end of the index
Convert clone to use dangling remotes
Merge pull request #1139 from ethomson/index_bugfix

don't walk off the end of the index
Define constant for default fetch spec
Fix network example
Stop premature remote freeing when cloning
Transport resolution on Win32 should handle absolute local paths
Enable authenticated clones in network sample
Add test to clone with absolute path
Fix comment so it doesn't go over 100 chars
Merge remote-tracking branch 'jamill/transport_localpaths' into development
Merge remote-tracking branch 'origin/clone-auth' into development
test: Fix clone tests
tests: Fix unused temp repo
travis: update the apt-get db
Introduce git_clone_options