Added item formatting feature

Every item can optionally have a formatter. Formatter is a function
called for each item when q_menu_display is called. String set in output
parameter of formatter function will be rendered as the item string.