Reorder destruction of objects owned by client (wallet, rpc_server, p2p, cli) to avoid executing RPC calls that would use the p2p node after the p2p node was destroyed.
Remove code that explicitly terminated owned threads, this is now done by fc::thread's destructor.
Revert "Revert "Prevent multiple RPC requests from executing at the same time.""

This reverts commit be479aea3036743a302168a465e868d9b14f5b51.