Scaling - initial draft 

Marek please review the code
With @bwilk we assumed that optimization process can be run in asynchronous mode, thus the only way to return information to the user is to set "some" state and explanation. We knew that it is not perfect, but currently it is the only solution we have. We was thinking about something like "optimization_log" (with one to many relation with appliance) - this is feature work.