Add memory leak cases to test suite
Created by: avullo
The latest, more comprehensive, travis builds have exposed some memory leaks which occur when releasing memory of an index. Ensure these and other types do not occur by adding appropriate tests, e.g. using Test::LeakTrace.