Add layer counting to SkPictureRecord

This will be used for a SkPicture::suitableForOptimization entry point.

Committed: https://skia.googlesource.com/skia/+/4a2b2e8ed2e35171bf98bad68a69daaced11ec7c

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/464433002
6 files changed