coverity/13765,13766,13767,13768: Fix memory leaks in hardcopy.c

The function mch_print_begin() returns early in case of an
error, but without freeing allocated memory.
To fix this, use stack allocation instead of heap allocation
for the variables res_prolog, res_encoding, res_cidfont and
res_cmap.
Merge pull request #1483 from oni-link/fix.mch_print_begin.memory.leak.stackversion

coverity/13765,13766,13767,13768: Fix memory leaks in hardcopy.c