Sudan army rulers and protesters agree on three-year transition period