Sami Anan resigns as military adviser to Egypt President Mursi