Millions of Egyptians have turned out to vote in a referendum on a new constitution, a month after the fall of President Mubarak and his government.