fix #9321 Crawler::addHtmlContent add gbk encoding support
use restore_error_handler instead of set_error_handler($previous)
fix some cs
bug #9323 [DomCrawler]fix #9321 Crawler::addHtmlContent add gbk encoding support (bronze1man)

This PR was submitted for the 2.2 branch but it was merged into the 2.3 branch instead (closes #9323).

Discussion
----------

[DomCrawler]fix #9321 Crawler::addHtmlContent add gbk encoding support

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |  #9321
| License       | MIT
| Doc PR        | n/a

This is solution 1 in https://github.com/symfony/symfony/issues/9321#issuecomment-26508649

Commits
-------

30af288 fix some cs
9f20b24 use restore_error_handler instead of set_error_handler($previous)
53cb6ad [DomCrawler]fix #9321 Crawler::addHtmlContent add gbk encoding support