Fix retreival by manual indices

Support for manual indices was not being implemented correctly before and was the same a key indices.
Improved tests for batch extension

Fix false positive in manual index tests .  Add checking of return values for manual and key index tests.
Call close on CloseableIterable types