All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Slavery was practiced all over the world at the advent of Islam. In fact, it was an economic and social system among all the countries and the people. So, Islam proceeded from the very beginning to remove the origins of slavery and to limit its sources. Islam left only one source for slavery that is enslavement in war and only legal war (i.e. against the non-Muslims). Indeed, the enslavement of prisoners of war was a part of warfare. So, Islam did not free the slaves of its enemies while its own followers are enslaved by those enemies and given the worst possible treatment. It is known that to deal with someone in the manner in which he deals with you is fair to stop his aggression on you.
Although Islam established equity in dealing with slavery, it gave the ruler of the Muslims the freedom to treat the prisoners in one of three ways:
1) Free them without a ransom.
2) Free them against a ransom.
3) Enslave them.
In Islam a clear, practical and systematic way to free slaves was established:
1) It made freeing slaves a highly desirable act.
2) Freeing slaves by paying expiations.
3) Granting emancipation by the slave freeing himself from his master by paying installments.
4) Granting freedom through the state welfare.
5) Freeing any woman with a child from her master as soon as the latter dies.
6) Freeing any slave who was beaten unfairly.
After this introduction, we dare saying that Islam is the freer of slaves and is equitable in treating human beings. We are very proud of this. So, if the world now gets together and forbids slavery, Islam will welcome such an initiative as it fits into its aims and objectives. It is lawful for the Muslim leader to sign a convention forbidding slavery.
But this does not mean that slavery was abrogated definitely and has become legally inexistent. If the world returns back to enslaving prisoners of war, Muslims will treat their enemies equally.
As for what you mentioned in your question that the Sharee'ah asks (free non-Muslims to sign a contract whereby they become slaves as to get their rights and the protection of the Sharee'ah, … etc.), then this is not true at all and no Muslim ever said so.
In fact, all these rights are assured by the Islamic state to all those who live permanently in it: (Muslims or Thimmi) [Thimmi means a non-Muslim resident in the Muslim state] as well as those who live temporarily in it such as ambassadors, … etc., regardless of their religion, colour or race and regardless of whether they were free or slaves. There is a strong warning for anyone who enslaves free people.
Abu Hurayrah narrated that the Prophet said: “Allah said, 'I will be an opponent to three types of people on the Day of Resurrection:
1. One who makes a covenant in My Name, but proves treacherous.
2. One who sells a free person and eats his price.3. One who employs a laborer and takes full work from him but does not pay him for his labour." [Al-Bukhari]
Abu Daawood reported in another narration: “And any man who enslaves a free man.” Ibn al-Jawzi said: “The free person is the slave of Allah. So, anybody who enslaves him, Allah as his Master, will defend and support this free person.”
Others say: "His sin is great because anybody who sells a free person, he prevents him from acting freely in his property and made him bound to lowness which Allah has saved him from." For more benefit on slavery, please refer to Fataawa 357964, 256111, 83687, and 82182.
Allah knows best.