fixes #11619 - only check template changes when persisted
(cherry picked from commit bf5f18013ad224a93d917d696d94952965a8968d)
Fixes #11035 - template preview feature
(cherry picked from commit de9e7adaa579db01d043d6a04a83c946a3d33850)
Fixes #7096 - Adds STI to templates
This commit converts Ptables to be just another type of Template so itgets the same features as ConfigTemplate. ConfigTemplate was renamed toProvisioningTemplate to reflect UI and the name under it's commonly known.