Fix #17535
Fix #17535

Treat `onDidTerminatePendingState` and `onDidDestroy` as independent 
optional functions that a PaneItem can implement. A PaneItem is free to 
implement neither, just one of them, or both of them.

liuderchi/atom,brettle/atom,atom/atom,stinsonga/atom,Mokolea/atom,brettle/atom,PKRoma/atom,Mokolea/atom,Mokolea/atom,liuderchi/atom,liuderchi/atom,stinsonga/atom,stinsonga/atom,atom/atom,liuderchi/atom,t9md/atom,atom/atom,andrewleverette/atom,brettle/atom,stinsonga/atom,PKRoma/atom,t9md/atom,andrewleverette/atom,t9md/atom,andrewleverette/atom,PKRoma/atom