Simplify median_time_past and guard height 0 fail, use const/auto.
Simplify median_time_past and guard height 0 fail, use const/auto.

libmetrocoin/libmetrocoin-blockchain,libmetrocoin/libmetrocoin-blockchain,libtetcoin/libtetcoin-blockchain,bitprim/bitprim-blockchain-replier,bitprim/bitprim-blockchain-replier,libmetrocoin/libmetrocoin-blockchain,libtetcoin/libtetcoin-blockchain,libtetcoin/libtetcoin-blockchain