Automatically select the optimization level.

If the cloud is specified using --cloud, select PERFORMANCE,
otherwise COST.
Fix bug when --services not specified.
version 1.7
start working on 1.8