chore($parse): micro-optimization for ensureSafeObject function

This version matches the "alternate 2.2" version here: http://jsperf.com/ensuresafeobject/2

alternate 2.3 is a bit faster and simpler, but would break backwards compatibility.

Closes #5246
fix(ngSanitize): prefer textContent to innerText to avoid layout trashing

innerText depends on styling as it doesn't display hidden elements.
Therefore, it's better to use textContent not to cause unnecessary
reflows. However, IE<9 don't support textContent so the innerText
fallback is necessary. Note that we need to check for undefine
and not just reverse the order of these two since for an empty string
innerText would still be checked and a reflow would occur.