Fixes for issue #536: refactored error handler.
Refactored console controller color option.
fixed how console color should be enabled.
Replaced Jsonable with Arrayable.
Added support for different response formats.
Support for error response in different formats.
fix MigrateController
Merge pull request #537 from sergon/patch-4

fix MigrateController
Moved toArray() from YiiBase to ArrayHelper.
Merge branch 'master' of github.com:yiisoft/yii2
Removed headers in ErrorHandler.
Added previous exception in toArray().
Recursively return previous exceptions in toArray().
Put back Yii::getObjectVars() and fixed infinite loop in Object::toArray().
Removed unused namespace.
validator use static instead of self
Merge branch 'master' of github.com:yiisoft/yii2

* 'master' of github.com:yiisoft/yii2:
  Removed unused namespace.
  Put back Yii::getObjectVars() and fixed infinite loop in Object::toArray().
  Recursively return previous exceptions in toArray().
  Added previous exception in toArray().
  Removed headers in ErrorHandler.
Removed unused methods.
cleaned up "use" statements.
renamed Application::handle() to handelRequest()

Name make more sense imo as it is not clear what it handles otherwise.
Removed unused method processRequest form console app and also refactored
console Application to be more similar to web Application.
removed unnecessary check
Merge pull request #538 from cebe/handle-request

renamed Application::handle() to handelRequest()