fixed Save optimization, did some refactoring on BE, fixed button status...

...es for both optimization and calibration

https://trello.com/c/kisaYeTE/372-save-optimization-does-not-do-anything

(should preferably be reviewed by someone who can check both BE and FE)
As an alternative you could use an object to describe state & related meta data like the text. Here an example:

    var status = {
      NOT_RUNNING: { text: "Optimization is running", isActive: false },
      RUNNING: { text: "", isActive: true },
      REQUESTED_TO_STOP : { text:"Optimization is requested to stop", isActive: true }
    };

    // assign the message
    $scope.optimizationStatus = status.NOT_RUNNING;

    // check if it's running in the template
    ng-disabled="optimizationStatus.isActive"

    // message in the template
    {{ optimizationStatus.text }}