Prefetch attachments

First steps for a "prefetch attachments" feature as discussed in https://github.com/owncloud/news/issues/5.
Currently only handles images.