Only require the user to input the passphrase once, unless creating
a wallet.
Should they mis-enter the passphrase, they will be warned Electrum
couldn't pair the device, and when they actually need to use it
they will be prompted again.
Fixes#1672
Move session timeout from wallet to config
Prevent timeouts whenever a device operation is in progress
Move timeout job from each plugin to device manager
Tell the user and ask if they want to try again. If they
say no, raise a silent exception. Apply this more friendly
behaviour to the install wizard too (see issue #1668).
Only warn about watching only once given a chance to pair.
Failure to pair makes watching-only and warns.
In error message to user, distinguish between failure to connect
and failure to pair.
Rework the way the daemon and server are created. If we might
want to create a daemon, try to grab the lockfile with O_EXCL.
If we got it, create a server and daemon, otherwise try and
connect to the server. If connecting to the server fails (including
after sleeping a little in case the server was recently created),
remove the lockfile and start over.
Other fix: shut down network gracefully on daemon exit.
Fixes#1638
All Daemon creation was preceded by Network creation, based on
config, and passing it to Daemon.
As config is passed to Daemon, it might as well create its own
network and the code is in one place.