Add ~. and ~^Z handling to exit/suspend dbclient
Fix a few compile warnings