[MRG] automate keepalive for TLegend, Pad, and THStack