[client] Make sure only one seaf-daemon instance can run.
[client] Fix a few bugs.