Consider number of available instances in deas before starting app.

This change set allows users to take advantage of the available instances capability in dea and limit the number app instances spawned per dea.
fixed travise ramdomized build error