WIP: behaviors refactoring

See https://github.com/yiisoft/yii2/pull/2269 and https://gist.github.com/lucianobaraglia/8d184cd9b9c7505a0b24