Fix issues around use of class_exists and function_exists
Bugfixes
Fixes an issue (#1859) introduced in 3.4.3 where conditional definitions of functions e.g.
if (!function_exists("some_function")) {
function some_function() {...}
}
would result in a crash some_function
does exist in the runtime, and it's internal.
Also fixes a similar issue (#1860) where Psalm could crash while analysing blocks surrounded by a if (class_exists(Foo::class))
if Psalm thinks Foo
always exists.