[BREAKING CHANGE] Simplify updateState params

Replace full/partial annotations and nodes with fragment and
let the tool compute them as needed.

Add caching to SurfaceFragment#getLeafNodes now that it may
be called multiple times as selectNodes is expensive.

Also pass through directionality in case the tool wants to know.

Marked as breaking change for the API change to updateState but
shouldn't break MW.

Change-Id: I8ac9802f776d914c78c36b41a0f000484e9fabf0
Merge "[BREAKING CHANGE] Simplify updateState params"