Fix for JRebel
Set Thumbnail only commit after all changes made

This change ensure that the metadata is not committed until after all
the changes to the metadata are done.  Before it was possible to remove
old thumbnail, a commit would occur, then exception occurs while trying
to add new thumbnail.  This would leave the metadata in a state where
the thumbnail is missing.