Add support for optional properties

In the "Add Property" dialog, there is a new section 'Template Properties'
that will work together with the template extension. Instead of just
properties that are in use elsewhere, properties that are listed in the
template are displayed here.