People wait to vote in Islamabad. Pakistan has been directly or indirectly ruled by its military for most of its 71-year history.