Fix bloom tests, p2sh part.

Fixing only those parts that do not test for p2pubkey scripts
because we have hardly any, if any transactions other than
p2sh. Regression testing will still work for p2pubkey, but
those are performed on bitcoin blocks rather than ours.

Fixed units:
- bloom_create_insert_key
- bloom_match
- merkle_block_1
- merkle_block_3 with an actual doge block
Corrected block maturity test.
Added GetHeightInMainChain() method.
Corrected call to GetDepthInMainChain() with GetHeightInMainChain() when checking coin maturity.
DRY calculation for required maturity depth

Having this defined in multiple places is suboptimal and may lead
to porting issues, so I extracted it into it's own function and
let both implementations call that instead.
Merge pull request #478 from patricklodder/1.7-dev-fix_bloom_tests

Fix bloom tests for p2sh
Merge pull request #481 from patricklodder/1.7-dev-maturity-depth

fix maturity depth in CMerkleTx::GetBlocksToMaturity