fix -rescan, fix -txindex help, enable actually rescanning for certissuers, remove memleak, some hints

review & test carefully, this may bring up previously unnoticed bugs!