Remove the recordHandlerThreadID instrument func

This was MySQL related code and should be deleted for general purpose.
Fix a bug brought by RecordType enum

The RecordType enum can not be converted implicitly to int, thus we
should treat it carefully when comparing.