XD-1747: Module deployment order is not guaranteed

Modified `writeDeployment` to deploy each module serially (but still write out deployment requests for a module to multiple containers at once). This is required to guarantee that modules for a stream are deployed in the correct order.