Allow iteration over files dict before template stored
Allow iteration over files dict before template stored

Due to a programming error, the files dict of a template would appear to
contain no items when iterated over prior to them being stored in the
database. (Individual items could still be accessed directly by name.)
Since this is the mechanism by which dictionaries are serialised (directly
or e.g. via items()), this resulted in an empty files dict when trying to
send the data over ReST. (The same is likely true of RPC, but we don't
generally send the files dict over RPC any more.)

Since validation occurs before the template is stored, this meant that we
could not validate a remote stack over ReST.

Change-Id: Ie7433557321c54075ad531def0247fad735d07d9
Closes-Bug: #1739447

openstack/heat,noironetworks/heat,openstack/heat,noironetworks/heat