Speed up isortedset, use lower() as default key, add unit tests