Correct fix for #4060
Fixes #4071: `mail` component renamed to `mailer`, `yii\log\EmailTarget::$mail` renamed to `yii\log\EmailTarget::$mailer`
Missing files for #4071
'Security' helper usage switched to 'security' application component.
made mcrypt a framework requirement
Advanced app `User` model code style fixes
Advanced app `User` model code style fixes
Fixes #3992 Fixes #4147
Switched to Codeception 2.0.* for application template tests
Fixes #4177
typo
IdentityInterface::findIdentity should return active users

```
interface IdentityInterface
{
    /**
     * Finds an identity by the given ID.
     * @param string|integer $id the ID to be looked for
     * @return IdentityInterface the identity object that matches the given ID.
     * Null should be returned if such an identity cannot be found
     * or the identity is not in an active state (disabled, deleted, etc.)
     */
    public static function findIdentity($id);
```
added common tier config
Advanced app `User` model code style fixes
Fix invalid indentation.
Initial migration code must match code generated by console migration controller.

Minor consistency issue. See the following files for more details:
1. framework/views/migration.php
2. framework/console/controllers/MigrateController.php
Fixes #4252, Fixes #3171 Fixed Codeception
Codeceoption adjustments

- Removed hacks since these are no longer required: https://github.com/Codeception/Codeception/commit/71db233985531f298264dc4ca0160d2aa1c83b7f
- Removed unused helper classes
- Added 2.0 style "actor" to config

Thanks to @Ragazzo and @DavertMik for helping with it.
`yii\web\Request::cookieValidationKey` is now automatically generated by the installation script for the basic and advanced application templates
Request::cookieValidationKey must be explicitly specified now.