transaction callback added

Added transaction callback shortcut . Related with [this](https://github.com/yiisoft/yii2/issues/3384) issue 
The transaction object is needed to get `db`. Sure you can get it globally, but why if we can already provide it via parameter (and this is parameter-based DI). When you write callback, you don't need to specify the parameter if you don't use it.

We introduce this `transaction()` method because we want to make the code simpler without writing `try..catch...` thing. I see no reason why we should limit ourselves  to only supporting closures.