New truncate and truncateWords methods

New truncate and truncateWords methods, https://github.com/yiisoft/yii2/issues/2941
Update BaseStringHelper.php

Length check.
Update CHANGELOG.md
Update BaseStringHelper.php

Updated to use mb_* functions
Test case for new truncate methods.

Test case for new truncate methods.
Update BaseStringHelper.php
Update BaseStringHelper.php
Changelog update
setting writable folders in init-script

It is said, that these folders are handled already by composer.json, what is definitely true. But if I can't (or don't want to) call composer create-project command, I have to run post-create-project-cmd manually like `composer run-script post-create-project-cmd`. IMHO, it's consistent to make such preparations in init script.
no need to set writable folders for console
removed unnecessary lines regarding writable dirs
Fixes #3251: controller should be created using DI container.
Cleaning Up
Removed requirements.php reference

Didn’t make any sense, particularly after the browser stuff. If kept,
I’d move it behind the other command-line reference.
More cleaning up
created Appcontroller to make it easiert to debug

controller links application vendor to yiidev repo
refactored Debug Mail panel to work with different vendors

implementation checks for instanceof for additional swiftmailer
capabilities.

issue #2870
Update getting-started.md

Added alternative way of setting up dev environment.
typo in comments

property can be set via [[setComponents()]]
Merge pull request #3255 from lynicidn/patch-1

typo in comments