Refactor `to_unicode`, handle `str` first.
Authored by: cboos 2010-03-21
Parent: [r9383]
Child: [r9385]