Add getconnectioncount rpc function, fix spending password entry on cli to use
a five minute timeout