REORG: server: add a free server function

Create a new server function named free_server. It can be used to
deallocate a server and its member.
3 files changed