detail::unique_ptr implementation.
easy: escape() and unescape() refactoring.