Some coin database memory usage tweaks.

* Make CScript::clear() release memory (indirectly causing transaction outputs being
  spent to release associated heap memory).
* Make CCoinsView::BatchWrite consume the passed CCoinsMap, rather than copy from it.
  * As a result, CCoinsViewDb now progressively converts the map to LevelDB entries,
    rather than copying.
  * Merging a CCoinsViewCache into a parent cache uses CCoins::swap + release rather
    than copy + bulk release at the end.

Untested, but should reduce peak memory usage and some CPU time.
Hmm, I was reasoning in terms of a treemap, but it's a hashmap now. Just erasing all entries will not cause its hash table to be freed, and clear() afterwards will still iterate over all entries (to potentially erase them), so I'm not sure whether this weighs up against the slightly better peak memory usage.