classfile: add Ord instance for some types