(#18636) Change to friendlier way of specifying suitability

The previous way of setting the suitability of a token was very hard to
grasp for my feeble mind. It also caused RDoc to have problems parsing the
code unless developers were always aware that they had to enclose the
method definitions in stopdoc/startdoc.

This changes it to provide a proc that determines suitability rather than
trying to change the class after the fact. There may be a small
performance hit because it is now two method calls, but I think this is
much more maintainable.