add get_error_handler() and get_exception_handler()

Sometimes it is useful to get the current error/exception handler without replacing it (which is already possible with set__handler and restore__handler albeit a a bit more work).
Merging this PR would also resolve https://bugs.php.net/bug.php?id=54033