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.
As this iterates over the full `mapCoins`, a clear() at the end may be faster than erasing the entries one by one.