allow unit tests to requireApp() on setUp()
mod: don't create app in bootstrap script, unit tests do it themselves
add: option to destroy app after each test to find unit tests that fail
     to require an app
add: new key for unit tests config named "className". Allows to run the tests
     using different Application instances (consoleApp/ webApp)
mod: TestCase::getParam accepts second param $default=null
mod: incorporate suggestions
- rename requireApp() to mockApplication()
- always destroy app on tearDown()
  - eliminates need for constant YII_DESTROY_APP_ON_TEARDOWN
  - mockApplication() becomes a lot easier. Destroying app on each tearDown
    means creating it on every call is fine. No more checking if it already
    exists and if it has been created from the same config.
- \yii::$app should have been \Yii::$app
RBAC: Item and Assignment optimized save approach
RBAC: DbManager code style fixes
RBAC: DbManager code style fixes
Merge pull request #204 branch 'unittest-app-dependency' of https://github.com/bwoester/yii2 into bwoester-unittest-app-dependency

* 'unittest-app-dependency' of https://github.com/bwoester/yii2:
  mod: incorporate suggestions - rename requireApp() to mockApplication() - always destroy app on tearDown()   - eliminates need for constant YII_DESTROY_APP_ON_TEARDOWN   - mockApplication() becomes a lot easier. Destroying app on each tearDown     means creating it on every call is fine. No more checking if it already     exists and if it has been created from the same config. - \yii::$app should have been \Yii::$app
  add: new key for unit tests config named "className". Allows to run the tests      using different Application instances (consoleApp/ webApp) mod: TestCase::getParam accepts second param $default=null
  mod: don't create app in bootstrap script, unit tests do it themselves add: option to destroy app after each test to find unit tests that fail      to require an app
  allow unit tests to requireApp() on setUp()

Conflicts:
	tests/unit/data/config.php
cleanup tests
fixed indentation in test files
cache tests refactoring cherry picked from redis branch
doc fix in caching classes
changed cache test to wait more than expirytime

change is to avoid random test failure on race condition.
fixes #203 #231
Merge pull request #230 from creocoder/rbac-db-manager-code-style

RBAC: DbManager code style
"YiiRequirementChecker" has been created as blank.
Method "YiiRequirementChecker::check()" has been implemented.
Method "YiiRequirementChecker::check()" has been refactored to be used in method chain.
Methods "YiiRequirementChecker::getResults()" and "YiiRequirementChecker::render()" have been added.
Test case "YiiRequirementCheckerTest::testCheckEval()" has been added.
better testing: time()-function-mock

as discussed in #203
https://github.com/yiisoft/yii2/issues/203#issuecomment-17759631
"YiiRequirementChecker::check()" has been updated to be able to collect different requirements set in the chained call.