Add some error handling to bitmap conversion.
Add some error handling to bitmap conversion.

Fixup for 7cf2b5809f7137acc7a5eed9159042b3d748da01, makes sure cairo
has all data committed to the surface, and handle random errors.

Change-Id: I39e5b5777968c4563a8ce3870bac3d4182090f3b

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core