refactor states / icons to StateWidget or similar
right now we have some duplication of the states/icons stuff. please refactor, and check what a good practice is for splitting widget/components in pyqt.
(from redmine: created on 2012-07-23, closed on 2012-09-03, precedes #474 (closed))