Revise default $g_display_errors setting

The default now reflects the recommended Production settings, and a
better recommendation for developers is documented in the phpDoc
comment block.

Fixes #17501
Init $g_display_errors with dev settings on localhost

When the server name is localhost/127.0.0.1, we automatically set
$g_display_error to the recommended development values, i.e.

 - E_USER_ERROR   => DISPLAY_ERROR_HALT
 - E_WARNING      => DISPLAY_ERROR_HALT
 - E_ALL          => DISPLAY_ERROR_INLINE

Issue #17501
Merge branch 'display-errors'

Pull Request #215
Restore helper_alternate_class() function

This is a temporary measure to improve backwards compatibility of 1.3,
the function will be removed again in the next release.

Fixes #17437
New DEPRECATED error type

Make use of E_USER_DEPRECATED instead of relying on WARNING for
deprecated functionality. Allows for differentiated error messages and
handling.
Add DEPRECATED warning to helper_alternate_class()
Delay printing of deprecated warnings to page bottom

This avoids display errors when a deprecated warning is triggered from
within an HTML tag, as was the case when using helper_alternate_class().
Add link to PHP constants for unhandled error types