Fix compiling issue on CYGWIN.
Fix issue for not SANE_SORTING

Remove obsolete header files.
Remove obselete settings from testsuite.