Use xmalloc() and xstrndup() in file_pat_to_reg_pat()

Unfortunately there's still a case where NULL can be returned from
file_pat_to_reg_pat().
(verbose_)?try_malloc() to use on buf_write()

There will be more use cases for try_malloc(): see #556.

 - Reimplemented xmalloc() using try_malloc().
 - verbose_try_malloc() is just like try_malloc() but shows an out-of-memory
	 error messafe before returning NULL.
 - Let the compiler generate size>>1 assembly for signed types. We're not using
	 compiler from the 80s.
No OOM error condition in prep_exarg()
No OOM error condition in ga_concat_strings() and simpler types

xmallocz() is not static anymore. There are many use cases for this function in
the codebase and we should start using it.
No OOM error condition in prt_build_cid_fontname()
Replace alloc() with xmalloc[z]() and remove unnecessary casts in hardcopy.c
No OOM error condition in concat_fnames() and concat_str()
No OOM error condition in save_patterns()