turnip: Move end-of-subpass resolves to a helper function.

Deduplicates a bit of attachment walking code, and drops a note about
something that's not right with how we're doing things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17943>
1 file changed