Refactor \yii\web\UrlManager

Refactor compileRules() to expose public functions parseRule() and addRules() for external use.

See changes to extensions/gii/Module.php for use case.