Tunisians lined up to choose from a diverse field of candidates on Sunday, in an unpredictable election for a new president at a time of economic pain in the young democracy.