ThriftService: Make the server to terminate gracefully

Change-Id: I927298fc9a35e2576f2179b1fa6f9a61d2a0bfd3
HttpService: Manage external variable httepserver just in HttpService class

Change-Id: I6958d54cc437fc54e5492ac09c54210c9db6bd59