Added ruby_22? and friends to CurrentRuby.

Backported #3189 to the 1.7 branch.