Allow angle-brackets in preformatted notes.

Angle-brackets cannot be represented in ENML in raw form. They must be
transformed into '&lt;' and '&gt;'. Make this transformation.

Also improve exception handling to catch errors while saving notes and
inform the user when errors occur that are unrecoverable.