Made mark_safe() compatible with SafeData.
Added tests.
Moved the wrapped method registration out of _method_wrapper.