Merge of (#9548) to Vaadin 7.

Calculate upload file size correctly when there are multibyte characters
in the file name.

Change-Id: I85f1053ce6ad29140d0a37fe8ab4861b0f717fc9