[embedlite] fix text events for predictive text input

Send empty compostion update and then composition end also when user completely erases the word that was in predit. This fixes issue where user first enters a char (predit has a char) and then user erases it (empty predit), thus here we receive empty pre-edit and empty commit string. Since old implementation did not send composition end or text event in that case, nothing happened and user had to press backspace second time to erase first char of pre-edit string, and this time it worked since there was no pre-edit active and that is why the second pre-edit was sent as keyevent. 

Also, send DOM Input Events for each char pressed so that websites that listen to input events work correctly. FF for android does the same. This fixes for example enabling of tweet button in mobile.twitter.com.