moved common parts of db ActiveRelation and Query to traits

these parts can be reused in other ActiveRecord implementations
add relationClassName to AR to allow different relation classes

... for different dbms
fixed conflicting property declaration
Unit test for 'yii\swiftmailer\Message' fixed.
Creating transport at 'yii\swiftmailer\Mailer' fixed to track possible "__call".
updated phpdoc and fixed generator read/write-only annotation
Merge branch 'master' of github.com:yiisoft/yii2
controller php-doc
Merge branch 'master' of github.com:yiisoft/yii2

* 'master' of github.com:yiisoft/yii2:
  Creating transport at 'yii\swiftmailer\Mailer' fixed to track possible "__call".
  Unit test for 'yii\swiftmailer\Message' fixed.
Getters for 'yii\swiftmailer\Message' fixed.
Fixes #1162: removed constructors of cache dependency classes so that they can be easily created from configuration.
Fixes test break.
minor fix to gii
save security keys as a serialized string instead of exported variable.
replaced exported value with serialized one.
use json format.
Fixes #1156: action parameter binding now checks for array type.
Fixes #1122: removed init from post-install-cmd-script of composer.
Fixed php-diff version.
added FileMailer implementation of mailer interface