Egyptian cabinet resigns, paving way for military chief to run for president