improved control over and handling of file and dir permissions

- rename FileHelper::mkdir for API consistency
- changed default permission for directories to 775 instead of 777
- added some properties to classes that deal with files to allow control
  over directory permissions.
Merge branch 'master' of github.com:yiisoft/yii2

* 'master' of github.com:yiisoft/yii2:
  Fixes #829: loginRequired now responds with HTTP 403 in case of AJAX or loginUrl is not set (reverted from commit c2c12a9049ec321e77ee13bc7f8a9a8293596b21)
  add missing return to module template
  Update module.php
  Fixes #829: loginRequired now responds with HTTP 403 in case of AJAX or loginUrl is not set
  gii form width adjustment.
  Make sure query cloning works as expected.
  Fixed test break.
  Fixes #828: refactored QueryBuilder::build()
typo in query builder, fixes #832