Reformat code with airlift code style.

Load the code into IntelliJ, get the airlift code style and run Ctrl+Alt+L in the root folder.
Fix bugs with allow-duplicate-installations-on-an-agent.

- Make sure that the config setting is respected everywhere.
- If less agents than requested installs are present and duplicate installation is allowed, install
  more than one instance of a service per agent.
code review feedback