Yii1 compatibility

removed YII_PATH constant from the framework to be compatible with Yii 1.1 and more flexible in general.

fixes #4501
Well, the issue is for using two Yii versions together (which by itself is already odd enough). Right now by getting rid of the constant, we are introducing many inefficient and lengthy code.