Hundreds of thousands of migrants entered the Spanish enclave of Ceuta by land and sea, prompting local authorities to declare a state of emergency.