XML: schemas.c: ensure proper upgrade-enter fallback & guard strdup arg
Former should have been in commit e535c3f4d; latter is an attempt to
make static analysis happy (despite that possibility is excluded as
long as the array of schemas in evidence only goes through
add_schema_by_version).
Also guard against some relevant cases where strdup might fail for OOM
condition -- when such result gets passed as
get_schema_path(NULL, result_of_strdup);
for which the outcome is now (correctly) also NULL, so it suffices to
check for that very NULL only.