bugfix and refactoring

Replace pointers with shared_ptr to fix memory leak

bugfix and refactoring

- Fix memory leak by utilizing shared_ptr.

- Make simple member function inline.

- Move calc_decision outside of the class as calc_new_stage, for this is not the responsibility of class decision.

- Adjust the order of members.

- Overload operator<< for class decision, replace describe() and recommend_ca().

- Modify getters and setters.

- Logic bug fixed.