REF: add custom Exception for safe_sort
xref https://github.com/pandas-dev/pandas/pull/25537#issuecomment-469425015

custom `Exception` added primarily to allow more targeted testing, but also to distinguish sort failures and bad input to `safe_sort` 