Reimplement Hash.classify/categorize using nqp primitives

This makes for about a 40% reduction in CPU