SF: Allow SurfaceFlinger to be subclassed

1) Make the destructor protected instead of private.
2) Make setClientStateLocked virtual for overriding.
3) Refactor commitTransaction to introduce a new virtual
   commitTransactionLocked for overriding.

Test: go/wm-smoke
Bug: 121291683
Change-Id: Iaa164b3c0f1f00ddf1e8ed468c0014e80adab843
2 files changed