Remote prune

This is a rebound from #2578. I've rebased master and fixed the compilation errors.

@carlosmn I've copied over the `prune_overlapping` test from git core and it looks like it passes the test, unless I'm doing something wrong, which is possible :sweat_smile: 

There is also a test that calls remote_prune without fetching, to ensure that it works as expected too, it's in the `fetchlocal.c` test file, should I move it somewhere else?

I'd really appreciate any feedback.

/cc @linquize
The reason it was giving unexpected results was because the logic is buggy. But doing update_tips after the prune, you're resurrecting the refs, which makes the tests pass, but it means we're still removing the ref, which we shouldn't be doind.