Issue 3182 "Can't paste two images from clipboard in markdown cell"
happens when the user tries to paste a second image into a text
cell and the image gets the same attachment key as the previous one.
This patch fixes that issue by adding an index to each picture that's
pasted after the previous one. Example:
* User pastes an image blob A. The text ``
is added to the text cell and the blob is saved as attachment `image.png`
* The user pastes a second image blob B. The same happens as with blob
A, except the key is now `image-1.png` rather than `image.png`
Special case:
If the user pastes the exact same blob A twice, it will not be added to
the attachments, but the textcell will get a second entry of
``.