Tests for sparse implementation of topographica

Implementation of #596 

I have made some progress on writing the tests. However, the test fails, because the output after the first iteration doesn't match with the expected output. Is there something obviously wrong with my code?