This [re]moves a lock and a direct mempool.mapTx access, by copying the TX memory pool contents into a temporary vector, for use when building a new block inside CreateNewBlock().
In addition to holding CTxMemPool::cs for a shorter amount of time, this makes it easier to parallelize CreateNewBlock() -- something already done in widely circulating miner-pool patches.
The cost: memcopying the TX memory pool at each CreateNewBlock() invocation (each getwork / getmemorypool new-work request).