bugfix: Exception handler compatible with PHP 7.
bugfix: Exception handler compatible with PHP 7.

PHP 7 changed the way it handles internal errors. Now, Exception objects inherit from the Throwable interface, as well as the new Error objects. Internal functions throw Error objects now instead of raising an error, so the exception handler would need to handle them as well. Therefore, the exception handler is no longer guaranteed to receive an Exception object. We need now to discern whether the parameter is an exception (and continue our business as usual), or an Error (in case such thing exists, only PHP 7), and in this last case parse it and let the error handler do its stuff.

This should resolve #330.

jschlyter/simplesamlphp,ghalse/simplesamlphp,simplesamlphp/simplesamlphp,dnmvisser/simplesamlphp,sitya/simplesamlphp,dnmvisser/simplesamlphp,jschlyter/simplesamlphp,jschlyter/simplesamlphp,sitya/simplesamlphp,simplesamlphp/simplesamlphp,sitya/simplesamlphp,simplesamlphp/simplesamlphp,dnmvisser/simplesamlphp,ghalse/simplesamlphp,jschlyter/simplesamlphp,simplesamlphp/simplesamlphp,jschlyter/simplesamlphp,dnmvisser/simplesamlphp,ghalse/simplesamlphp,sitya/simplesamlphp,ghalse/simplesamlphp