Make CBlockIndex* returned by GetDepthInMainChain const.

Make the `CBlockIndex*` (optionally) returned by `GetDepthInMainChain` const.  This prevents accidental modification.  The result is for reading its properties rather than modifying it.