Spain has accused Morocco of blackmail as thousands of migrants from the country arrived in the Spanish enclave of Ceuta.