widget: Simplify recursive widget logic and W_FORM/W_TABFORM special cases, remove unused variables.

Restore black background on ally research bars, missing from second-last commit.