Refactor lazy load small image checks

Refactor lazy load small image checks into HTMLImageElement since
the same checks are done in ImageLoader and the preload scanner. Finally
this way there is one single place for the kMinDimensionToLazyLoad threshold.

Bug: 846170

Change-Id: I6043c71ec944658f7ecccf00ef1262df6a84e5a2
Reviewed-on: https://chromium-review.googlesource.com/c/1406244
Commit-Queue: Rob Buis <rbuis@igalia.com>
Reviewed-by: Scott Little <sclittle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622788}
4 files changed