Fixes #5715 - make sure the rest client doesn't get PhusionPassenger::Utils::TeeInput

Rest client 1.6.7 is not able to handle that, passing the string
instead. The behavior should stay the same.
Merge pull request #4086 from iNecas/rest-client-passenger

Fixes #5715 - make sure the rest client doesn't get PhusionPassenger::Utils::TeeInput
Fixes #5654 - Permissions for env promotion/remove

This commit contains code to handle environment promotion and deletion.
Basic Rules
To Promote/Remove you need
1) promote_or_remove_content_views from content views
2) promote_or_remove_content_views_to_environment from lifecycle environments.

Note: Remove of a content view is slightly different from "destroy".
Remove implies removal of content view versions which could entail
removal from environments.