Added attchment previews.

Plugins can now declare what their preview should be (in HTML) or, if none is defined, the content will be streamed back to the client as a download.