Add CMutableTransaction and make CTransaction immutable.

In addition, introduce a cached hash inside CTransaction, to prevent
recalculating it over and over again.

Conflicts:
	src/chainparams.cpp
	src/core.cpp
	src/core.h
	src/miner.cpp