Do not try to send PDF when user aborts the render
When user aborts the job that already started to render, it still
calls the callback() even the output is undefined. if pdf
variable is undefined we shouldn't return the output, just close
the resource. Also, because there was no output code was throing
a `Cannot read property 'length' of null"' error. This patch should
fix that
Additional changes:
- request stats should be always counted, not only when jobs arre successful
Bug: T186748
Change-Id: I7a278304b10733424d2340113c18a809ab2da2f5