Many people strive to pay off their mortgage before they retire. But that isn’t always the best financial move.