[graphite] Refactor layer/binding-list/draw recording functions

`recordBackwards` becomes `searchBackwards` and returns the Layer and
BindingList that the Draw should be added to. `recordForwards` is
renamed `findOrCreateBindingInLayer` to emphasize it's only used after
the pilot draw.

The `Draw` creation logic is handled in `recordDraw` after the final
BindingList is found. Splits Layer::add() into a `addNewBinding()`
function on Layer for creating and inserting new BindingLists and a
separate BidningList::addDraw() for inserting the Draw into a
BindingList.

Bug: 419535595
Change-Id: Ic8b52ca9047f6094e6b526b891846953286973e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1283258
Reviewed-by: Thomas Smith <thomsmit@google.com>
3 files changed