Added git index methods to documentation.
Reverting "We should be relying on garbage collection."
Revert "We should be relying on garbage collection."

This reverts commit 307b452c02bf47b07357cd21a92cbd2ec0c1782c.
New backwards compatible version of the with repository macro.
Added initial working index test.