rb_scan_args misuse + few minor changes (see details below)
* unification: makes pe last argument everywhere
* rb_scan_args is not zend_parse_parameters: optional arguments are set to
Qnil, they don't keep their initial value
* UT: write_dtd_notation and write_dtd_external_entity