Sudan military rulers, protesters agree on 3-year transition period