Switch to CCoins & CCoinsView approach

This commit replaces old transactions index with unspent coins database
which contains a basic metadata like heights, amounts,
coinstake/coinbase flags and timestamps.

We still need access to blockchain for proof-of-stake blocks
validation. Current CheckProofOfStake() uses the coin database to
find the block height, and then scans that block to find the dependency
of coinstake kernel.
chmod 0755 leveldb/build_detect_platform