Additional check added to the user_role_grant_permissions

Without this check module that use Features can fail to update permissions, as module can be disabled, but permissions exist in feature.
Minor fix: ensuring that $entity is object (for some weird reasons, sometimes it's not)
Minor fix: menu item weight sometimes can be undefined, causing warnings
Using vocabulary machine name instead of id to create permissions

Very important patch. WIthout it, for permissions will be used vocabulary id (vid), what will cause problems working with Features module
CDD.txt file added
Global $environment variable added to override $conf

Global $environment variable can be used in settings.php to override $conf (Drupal variables) values.