Move data preparation logic from orchestrator to nailgun

Ready for review
* need to implement deployment order logic
* need more tests (as usual)