Escape non-printable characters in the junit XML output

XML doesn't allow most of the characters < 0x20 and binary output
breaks XML parsers. Such characters are not allowed as entities
either, so the generated entities are escaped in order to be printed
as text.
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Escape non-printable characters in the junit XML output
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Escape non-printable characters in the junit XML output
Merge branch 'PHP-5.6'

* PHP-5.6:
  Escape non-printable characters in the junit XML output