CLN: move safe_sort from core.algorithms to core.sorting
COMPAT: safe_sort will only coerce list-likes to object, not a numpy string type

xref: https://github.com/pandas-dev/pandas/pull/17003#discussion_r128332208