Improve checking of pdump load failures

* src/alloc.c (memory_full): Just report "memory exhausted" if
failure occurs during initialization, since fancier recovery
schemes are not likely to work when not initialized.
* src/emacs.c (dump_error_to_string): Accept int, not enum
pdumper_load_result, since the result might not fit in the
enum.  Use strerror if it was derived from errno.  This is for
better diagnostics of pdump load failures.
(load_pdump_find_executable): Return char *, not enum.  2nd
arg is now pointer to buffer size, rather than pointer to
pointer to buffer.  All callers changed.  Use Emacs allocator
since they should now be OK even during early startup.
Use check_executable instead access, to use effective rather
than real permissions.
(load_pdump): Return void since callers ignore result.
Use int where enum could be too narrow.  Use heap rather
than stack for possibly-long string.  Prefer ptrdiff_t to
size_t.
* src/fileio.c (check_executable): Now extern.
* src/pdumper.c (pdumper_load): Return int that may have
errno added to it, for better diagnostics when loads fail.
1 job for master in 54 minutes and 56 seconds (queued for 6 seconds)
Status Job ID Name Coverage
  Test
failed #3250
test-all

00:54:56

 
Name Stage Failure
failed
test-all Test
Makefile:319: recipe for target 'check-doit' failed
make[2]: *** [check-doit] Error 1
make[2]: Leaving directory '/builds/emacs/emacs/test'
Makefile:294: recipe for target 'check-expensive' failed
make[1]: *** [check-expensive] Error 2
make[1]: Leaving directory '/builds/emacs/emacs/test'
make: *** [check-expensive] Error 2
Makefile:959: recipe for target 'check-expensive' failed
ERROR: Job failed: exit code 1