Add unicode_safe_repr class decorator

This provides a simple, safe way to have __repr__ return
values which have Unicode characters escaped using the
unicode_escape encoding