Update configuration

Create <main.php> with common configuration that will be the base of every configuration.
Move local config files (<config.sh>, <database.php>, <params.php> and <caching.php>) to the /protected/config/local/ dir.
Move type-specific configuration into separate dirs:
- web
- console
- gearman

Extend <YiiBase> and add two new methods and one parameter:
- createApplicationByType($class, $type)
- getConfigurationFile($file, $default)
- $configDir.

Update ConsoleCommand and GearmanWorker:
- use Yii::app()->basePath instead of using global $config variable.

Update <setup.sh>.
Delete <config.php> files placed in module dir.
Delete <APPLICATION_NAME> constant.