Refactoring, Fixed a test

1) Fixed AddPermissionLevelToUserTest. The test works now.
2) extracted common code from Site.IsFeatureActive and Web.IsFeatureActive into a separate function IsFeatureActiveInternal
3) Extracted common code from Web.ProcessFeature and Site.ProcessFeature into a seperate function ProcessFeatureInternal