How do I revert all custom Contact tabs and static data entry fields to back the default configuration?

How do I revert all custom Contact tabs and static data entry fields to back the default configuration?

Feature: This feature allows a User to reset all custom static contact fields and tabs within a Company back to the default configuration of three static tabs (Info, Address, and Preferences) and their corresponding data entry fields. 

Who will be using this? This feature is available to Site Admins and Super Admins.

Warning: Once the default mode is set, it will no longer be possible to make further edits to Contact organizational tabs or static data entry fields. 

Process:

When for a Company the “Edit Static fields” action is performed then a button called “Revert to Default” will be provided in Setup > Custom Fields > Contact page (only for Site Admins and Super Admins).



Clicking on the button will provide a confirmation dialog with a message:
This action will re-arrange the static fields into default tabs and custom fields in custom tabs; this action is irreversible, do you want to continue?

If a user selects "Yes", the following events will take place: 
  1. For Contact entries, it will no longer be possible to make edits to tabs or data entry fields.
  2. All used and unused static fields will move into default 3 tabs of Info, Address and Preferences.
  3. Custom tabs will serialize after Preferences tab.
  4.  Custom fields will be re-arranged in the tabs. 
How the platform handles duplicate names: (If a custom tab has the same name as one of the default tabs then the platform will add a number to the custom tab name after checking uniqueness. For example, if the tab created had name as “Info” then it will be renamed as “Info1”. Similarly, if the tab's name was “Info” and “Info1” then while renaming it will rename the first one into “Info2” and keep the second one as “Info1”.)