[wptrunner] Reland "Implement --leak-check for Blink-based browsers" (#47903)
This PR relands #47850 with two fixes:
- Introduce
ProtocolPart.after_connect(), then fetch the initial leak
counters there after thebaseprotocol part is initialized. This
avoids requiringbaseto besetup()beforeleak, which was true
by happenstance. - Tolerate
ExecutorBrowserwithoutleak_check, since some browsers
that don't inherit fromChromeBrowserstill use
ChromeDriverProtocolsometimes (e.g., print-reftests for Chrome on
Android).ChromeDriverProtocolstill excludes itsleakpart
altogether ifleak_check=Falseto avoid runningafter_connect().