NO-JIRA: Tweaked how Ruby 1.8 determines if a string is UTF-8

Uses the kconv stdlib module to add the "isutf8" method.
NO-JIRA: Fix Ruby smoke tests to work on Ruby 1.8

On Ruby 1.8 we need to explicitly load the rubygems module before
loading gems.