Backport Coverity fixes from Crosswalk 11.

This patch set contains cherry-picks from the 12 Coverity fixes that
landed in master. Backporting to crosswalk-10 was easier than doing so
for crosswalk-9, as there have been no conflicts or any need to backport
additional commits.

Alexis tested it locally and everything is fine.