Got text inputs the right width

Getting this just right required some new machinery, to allow Pages to
declare their own special Gadget handlers.  Pages should register their
hooks in beforeRender().