Adds test case for extra_matrix == nullptr.
Removes non-necessary operations in GaussEliminate().
GaussEliminate() now returns rank of matrix.