Fix Ruby syntax warnings
Refactor dea_pool
Prefer to put app on DEA that has least instances of that app

[Finishes #47859269]