Use encoding propagation for String#pattern
Add basic benchmarks to compare UTF-8 string handling algorithms
Add basic specs for character to byte conversions and vice versa

These specs are added to ensure optimizations won't break these
implementations.
Add spec for different encodings and string length
Separate out methods for UTF-8 string handling

This makes it easy to write optimized UTF-8 string handling algorithms
for byte -> character and character -> byte conversions and string
length computation.
Add optimized version of find_character_byte_index_utf8

This improves performance of getting the character index for a certain
byte offset. This works on word sized elements instead of bytes, being
able the handle data 8x faster on a 64 bit machine for valid utf-8 data.
Improve performance of find_byte_character_index_utf8

This also uses the fact of processing a word sized operand at once
instead of working per byte.
Implement faster UTF-8 string length computation algorithm

Anecdotal ri/rdoc generation time for installing Rails 4 with an empty
gem set. Also here there is an almost 10x performance improvement on the
documentation generation time.

Before:

Done installing documentation for i18n, multi_json, tzinfo, minitest,
atomic, thread_safe, activesupport, builder, rack, rack-test, erubis,
actionpack, activemodel, arel, activerecord-deprecated_finders,
activerecord, mime-types, polyglot, treetop, mail, actionmailer, thor,
railties, bundler, hike, tilt, sprockets, sprockets-rails, rails after
2673 seconds
29 gems installed

real45m21.126s
user49m27.377s
sys0m13.794s

After:
Done installing documentation for i18n, multi_json, tzinfo, minitest,
atomic, thread_safe, activesupport, builder, rack, rack-test, erubis,
actionpack, activemodel, arel, activerecord-deprecated_finders,
activerecord, mime-types, polyglot, treetop, mail, actionmailer, thor,
railties, bundler, hike, tilt, sprockets, sprockets-rails, rails after
277 seconds
29 gems installed

real5m26.900s
user6m16.156s
sys0m16.581s