Single DB transaction for addresses from DNS seeds
Backported from bitcoin commit d655a26c9dd157a9e4bf08bff14bfaa69791287a
Fix some address-handling deadlocks

Made three critical blocks for cs_mapAddresses smaller, and moved
writing to the database out of them. This should also improve the
concurrency of the code.

Backported partialy from bitcoin commit a75d7066b824eb1e70fb5b0e0e7c3c122e00c4b6