Handle errors on merging via github api better

Several improvements to the error handling of the lander-merge-result job.
Returns non-zero error code on failure and prints errors to stderr. Also
copes with a weird api issue where the pr is reported as not mergable but
lacks the 'merged' key in the response.