Consolidate innerHTML setting logic

See https://github.com/facebook/react/commit/7eb33ef#commitcomment-5447724.
Merge pull request #1184 from spicyj/setInnerHTML

Consolidate innerHTML setting logic