Change widget css dict to a list,

even though this introduces O(N) complexity, it fixes a bug
where path dependent css traits could be executed out of order,
making it impossible to actually set the traits from the back-end.

closes #5821