Egyptian President declares a state of emergency in three provinces hit by rioting which has left dozens dead.