Cluster invalidation rectangles into coherent regions to lessen SkPicture re-recording

Apply a simple linear greedy clustering approach to all invalidated tiles in a layer to try to reduce the amount of clean layer area that gets re-recorded in response to a multi-rectangle invalidation event.

BUG=312861

Review URL: https://codereview.chromium.org/78883002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236806 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 236806