[sanitizer] Generic sorting in sanitizer_common.