Add basic sort functions.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>