Change AssetBundle.register() return type to static

Enable IDE typehints for custom AssetBundle properties (related to #2572).
added unit test for #2568
Merge pull request #2574 from andy5/patch-1

Change AssetBundle.register() return type to static
added server name, for creating url rules
Merge pull request #2576 from Ragazzo/yii2_basic_tests_bootstrap_fix

added server name, for creating url rules
Changed `Controller::afterAction()`, `Module::afterAction()` and `ActionFilter::afterAction()` to pass `$result` by value instead of reference