Propertly restore thumbnail on cancel/rename/move

Since the thumbnail is now in a div, the code that tries to change the
thumbnail have been adapted here as well.

Fixes https://github.com/owncloud/core/issues/12898

Please review/test @jancborchardt @MorrisJobke @LukasReschke @icewind1991