htmLawed cleans stuff out properly, but there's no very good way right now to show text/html attachments, since everything gets jumbled up with our own CSS etc. Best would be an iframe or just a new tab or so.
Also moved AttachmentListItem and its extended class Attachment are moved into separate files (autoloaded from lib/).