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

* `from_coo` method was not checking whether the indices are sorted
* `is_canonical` method was not checking whether the indices are unique
  (i.e. no duplicates)