TST: adding test cases for COO sum_duplicates
ENH: adding sum_duplicates method to COO matrix
adding has_canonical_format to COO matrix
fixing build errors
incorporating @jaimefrio's vectorized version
Merge pull request #3646 from perimosocordiae/patch-4

ENH: sparse: adding  `sum_duplicates` method to COO sparse matrix