Bugs 1175 3815 3445/new versions of rpm package installation and apt package installation to fix several bugs

This pull requests adds a new version of aptPackageInstallation and rpmPackageInstallation in order to fix several bugs in one:
* http://www.rudder-project.org/redmine/issues/1175
* http://www.rudder-project.org/redmine/issues/3815
* http://www.rudder-project.org/redmine/issues/3445