Corrections to ensure Distance can be compared.  Closes #2206

This is an alternative solution to #2207, allowing `Distances` to be compared (and, e.g., `Distance(15.*u.kpc)**2` to return a `Quantity`). Adds test cases for the comparison.