Creates sort.cpp

This is becoming a much more general sorting library, and it is
increasingly practical to write this as a dynamic library, as opposed to
a header-only template library, so I moved what functionality exists
from sort.hh to sort.cpp and turned sort.hh into a plain header