implement String#tr and String#tr_s methods + specs

Added implementations for the String#tr and String#tr_s methods.

I realize the code isn't DRY. I wasn't sure how to add helper methods, so the logic is unrolled more than necessary. On the plus side, the tests are extensive, so any changes to the logic should be easy to make safely in the future.

If you need me to make changes, just let me know. Otherwise, I look forward to being able to use these methods in my cross-compiled code!