Fixes and refactoring of sparseFeatures/sparseMatrix/sparseVector

* moved sort_features() from matrix to vector and added unit-test
* fixed behaviour on duplicate indices and added unit-test
* moved get_feature() from features to vector and added unit test
* compressing duplicate indices in sparse vectors while sorting, added unit-test
* added method get_dense() for casting sparse to dense vectors, added unit-test
* added get_num_dimension() to get biggest feature index
* added parameter-less get_dense(), added unit-tests

@sonney2k, @karlnapf: We talked about it today.  Have a look.