updated extension documentation; added sections dependencies, versioning and authorization
reverted events
updated code style, added autoloading and prefix examples
updated dependencies and testing
added link to composer docs about autoloading
changed install to create-project, added hint
make Query reuseable

fixes #1545
refactored scalar query functions to share common code
Merge pull request #1560 from cebe/1545-query-reuse

make Query reuseable
make ActiveRelation reusable

fixes #1560
updated codeception docs. fixes #1558
removed based on samdark's comment from https://github.com/yiisoft/yii2/pull/1485/files#r8293528
updated autoloading info
updated database, based on @cebe's comment https://github.com/yiisoft/yii2/pull/1485#discussion_r8410809
Merge pull request #1485 from schmunk42/docs-extensions

updated extension documentation
Fixes #1522: added example of executing extra queries right after establishing DB connection
Fixes #1381: better description of Apache config required to hide index.php
Made yii2-dev composer.json more lightweight

Do not depend on all packages, suggest them instead. require-dev will still have them for testing.
Added note about changes in composer.json for yii2-dev
typo in bootstrap composer.json