Add Index#remove_dir.
Add Index#add_all, Index#update_all and Index#remove_all.
Honor CFLAGS, and set some sane defaults.
Don't leak like crazy in case an exception is thrown.
Fix remaining leaks and make sure that catch/throw and break still work.

The changes in the previous commit to keep memory from leaking was a nice idea:
I'd just make sure that yielding to ruby from a callback would be
protected  by `rb_protect`, and then return `GIT_ERROR` so that the
libgit2 iteration would stop and libgit2 could free all it's internally
used memory.

I'd then pickup the exception from `rb_errinfo` and re-throw it.

Turned out that this does not really work, because ruby also stores
catch/throw and break information inside `rb_errinfo`, and those can't
just be re-thrown. :(

This new approach makes use of the `payload` callback param to store
the jump location that we get from `rb_protect`, and pass that to
`rb_jump_tag` after libgit2 could clean up after itself.
bump libgit2 to 353a90
bump libgit2 to 122122
bump libgit2 to 5b4a70
bump libgit2 to c0e58e
bump libgit2 to eddc1f
bump libgit2 to 22ef0c
bump libgit2 to d0c36a
bump libgit2 to b0401c
Stop leaking memory in Branch.each and Branch.each_name.
Stop leaking memory in Repo.each_note.
Don't leak memory in Repository#each_id.
Don't leak memory in Remote#update_tips!
Don't leak memory in Remote#connect.
Don't leak memory in Remote#ls.
Introduce a common payload struct.