fix a few max call stack size exceeded errors

Resolves a RangeError when finalizing documents with many images and/or many pages.  Basically we're just ensuring that async functions call the callback in the next event loop in a few places where sometimes they returned async but sometimes they returned sync.

should resolve https://github.com/devongovett/pdfkit/issues/110