improve functionality of list

Allow looping a list with for_each macro from back to front.
make the order of arguments unified in list
fix panel for being inherited

The init function of widgets always allocates memory for the initialized
widget, making it impossible to call super constructor in derived
classes.

Other widgets will be fixed as needed.
apply font to gd immediately in widget_set_font().

Other derived widgets may need to calculate font width soon after
setting a font.

Other widgets may also need this change, and will be done as needed.