more comprehensive sorting tests
removed dependence on stpncpy and strnlen
fixed 64-bit seeding