Further fix for Bug 695260: Cope with out of memory in fz_draw_end_mask

If we hit an out of memory error in fz_draw_end_mask, then pop the
stack, and rethrow. Ensure that the generic device code catches this
error and sets the error_depth to 1 so that the final pop is ignored.
Tolerate zero-sized xref sections...

...like the one Microsoft Word generates.