Shutdown a server before termination.
TASK: OC-5408
This PR is made in an effort to make OCIM AppServer closes gracefully which was not the case. The approach followed here is to shut the AppServer off and then terminating it rather than doing a hard termination.