components fixes

- Component#apply should be called when component is rerendered.
- When component calls setState, its css class is updated to reflect actual component state.
- Added Component#toggleState convenience method.
- Fix rework task so css can contains e. g. keyframes rules.