Fixed sg_sparse_vector unit tests to be c++98 compliant

* removed "auto" type definitions
* replaced ">>" by "> >"
* replaced "for (auto &x : xx) {}" style loops
* fixed double-free in unit test which resulted in corrupted memory

PS: It's late.  Local tests are passing, but please wait for travis to double-check. :)