Do not destroy the local peer after a a normal termination of the process.

This is already done in destroy_all_peers, so the peer_destroy call
leads to a double free.
Also catch signal SIGINT for proper termination of the process.
Remove all states a peer added when destroying that peer.
Add som TODO comments.
Rename some functions for consistency reasons.
Destroy all peers when the proccess in terminated orderly.
Destroy all states belonging to a peer if the peer is destroyed.