[14.x] Fix `report()` passing a `null` log level to the exception handler
Since #61694 the report() helper always passes a third $level argument to the exception handler, even when no level is given. Anything that mocks the handler with the arguments it expects now fails:
$this->mock(ExceptionHandler::class)->expects('report')->with($exception, []);
report($exception); // No matching handler found for report($exception, [], NULL)
This is why the test suite on master has been failing since that PR, in ThrottlesExceptionsTest, ThrottlesExceptionsWithRedisTest, ValidationNotPwnedVerifierTest and ImplicitRouteBindingTest. Applications with similar expectations in their own tests would run into the same thing after upgrading.
This only passes the level when one is given, so report($e) and report($e, $context) call the handler exactly as before, while report($e, $context, LogLevel::WARNING) still forwards the level. report_if() and report_unless() go through report(), so they're covered too.