Viewer issue dev 4 4

Remove references to the buffered images when the viewer is closed or browser is closed. Issue noticed while investigating https://trac.openmicroscopy.org.uk/ome/ticket/10748

Rebased see #1272