By ending his presidential campaign two weeks before the Pennsylvania primary, Rick Santorum avoided what could have been an embarrassing defeat in his home state and preserved both his high profile in the Republican Party and his chances of again running for president.