replaced ASSERT by REQUIRE; fixed SGVector<T> dense() compiler error

* replaced ASSERT by REQUIRE in several places
* removed redundant assertions on get_num_vectors(): get_sparse_feature_vector(num) already checks it
* replaced SGVector<T> dense() by dense to fix compiler errors.