Messageformatter refactoring

Refactored message formatter as proposed in https://github.com/yiisoft/yii2/pull/1051#issuecomment-26988906 
Fixes #1062

WIP, do not merge yet.