Refactor a bunch of CategoryInputWidget code, tear out dead/broken redirect handling that should be rewritten

Category redirect stuff is currently broken because of I5c536697, but no one seems to have noticed.
Fix bug 69886 while we're here

Bug: 69886
Change-Id: I62cf23d0e86bc43d739bb4c4610a5a852146fa3f
Merge "Refactor a bunch of CategoryInputWidget code, tear out dead/broken redirect handling that should be rewritten"