The main change is to optimize the logic of creating COO matrix from another COO matrix. As the row indices and column indices is sorted when be created, so we can use the sub-array directly to create another COO matrix without sorting them.
Besides, this pr fixed some code style issues.
No new unit test is added and all unit test passed.
No new unit test is added and all unit test passed.