Make hide/show changes toggle respect showExternalRecentChanges setting

and instead of adding this check twice in the hooks file,
split the handling code into it's own class with tests.

Bug: 68461
Change-Id: Ic36fee7dc8c2ac3f67f944784c75c57f0fdf8c08
Merge "Make hide/show changes toggle respect showExternalRecentChanges setting"