Handle invalid code sequences in Html::encode()

As described in [this blog post](http://nikic.github.io/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html), PHP 5.4 introduced a new flag to `htmlspecialchars()` allowing invalid code sequences being replaced by &#xfffd; (REPLACEMENT CHARACTER).

Accepting this PR will highten security of Yii 2 apps and bring the framework closer to the recommendations found in the [Unicode Security Considerations](http://unicode.org/reports/tr36/#Some_Output_For_All_Input).