TestLockPointValidity is unused since D13133. Remove it, and remove include for GetConsensus that is no longer used.
LockPoint::maxInputBlock is no longer used by anything, TestLockPointValidity was the only user. We no longer need to compute it in validation and we can remove it from the struct.
As a result we longer need to include chain.h (CBlockIndex).