Kevin Pietersen has brought an end to his England career after he was left out of the squad for the World Twenty20 and tour of the West Indies.