SkPDF: SkPDFMakeArray; clean up pdfutils, pdfresourcedict

New templated function SkPDFMakeArray that for example replaced this
code:

    auto array = sk_make_sp<SkPDFArray>();
    array->reserve(4);
    array->appendInt(0);
    array->appendInt(0);
    array->appendInt(width);
    array->appendInt(height);

with this code:

    auto array = SkPDFMakeArray(0, 0, width, height);

Move some functions from SkPDFUtils to the only place they
are used and make them static: SkPDFUtils::AppendTransform,
SkPDFUtils::DrawFormXObject, SkPDFUtils::WriteString, and
SkPDFUtils::AppendCubic.

Also replaced SkPDFResourceDict::getResourceName with
SkPDFResourceDict::WriteResourceName and eliminated
SkPDFResourceDict::GetResourceTypePrefix.

Change-Id: I891339fa2d1e5819f22fb8d10d8d8ef75c9507e3
Reviewed-on: https://skia-review.googlesource.com/153884
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
13 files changed