serverd: add wallet dump support. scan for P2SH scripts. fix bugs.