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.
map.clear() still has to iterate over all entries, while they're already in the CPU cache when we're doing this. Also, it means more memory being freed early while increasing memory in the destination, in theory reducing peak usage.