Add error handling and unit test for pdf compositor service

Add a return status code to avoid aborting the service upon any error.
Mojo verifies the validity of returned handle, will exit it is not
valid.

Also add unit test for this service.

BUG=chromium:455764

Review-Url: https://codereview.chromium.org/2919823004
Cr-Commit-Position: refs/heads/master@{#490679}
11 files changed