Polls opened in Senegal on Sunday morning in a tightly contested presidential race that followed months of uncertainty and unrest that has tested the West African nation’s reputation as a stable democracy in a region that experienced a wave of coups in recent years.