(#22363) Make selector and case use same equality as for '==' operator

The is_match? used by selector and case used Ruby == for all
RHS matches except for regular expression. This is now changed to
use the Puppet '==' operator.

Also, in this commit is a change that checks that LHS result is
a String when the RHS is a regular expression - an issue is
raised otherwise (other than the earlier Ruby TypeError).

Tests added.