remote: fix rename docs
treebuilder: insert sorted

By inserting in the right position, we can keep the vector sorted,
making entry insertion almost twice as fast.
pathspec: use C guards in header
Merge pull request #2416 from libgit2/cmn/treebuilder-insert-sorted

treebuilder: insert sorted
treebuilder: use a map instead of vector to store the entries

Finding a filename in a vector means we need to resort it every time we
want to read from it, which includes every time we want to write to it
as well, as we want to find duplicate keys.

A hash-map fits what we want to do much more accurately, as we do not
care about sorting, but just the particular filename.

We still keep removed entries around, as the interface let you assume
they were going to be around until the treebuilder is cleared or freed,
but in this case that involves an append to a vector in the filter case,
which can now fail.

The only time we care about sorting is when we write out the tree, so
let's make that the only time we do any sorting.
treebuilder: don't keep removed entries around

If the user wants to keep a copy for themselves, they should make a
copy. It adds unnecessary complexity to make sure the returned entries
are valid until the builder is cleared.
treentry: no need for manual size book-keeping

We can simply ask the hasmap.