tfg: Renamed HardwareTriggeredScaler to TFGTriggeredScaler as it is tfg
specific. Also manually merged in changes from 8.22 svn. Restructured
code and commented.