Fix some bugs with `from_coo` method and `is_canonical`

* `from_coo` method was not sorting the indices
* `is_canonical` method was not checking whether the indices are unique
  (i.e. no duplicates)
* Add some tests for `from_coo`