Declassified documents show Madrid and Morocco were warned of plans by migrants to breach the Ceuta border.