Allow instance NetworkInterfaces to be list of str or dict

It should be possible to specify NetworkInterfaces of an instance either
as an array of strings or as an array of dicts.

The following should now be possible:
This will define nics in the order specified by DeviceIndex
"NetworkInterfaces" : [
  { "NetworkInterfaceId" : {"Ref" : "controlXface"}, "DeviceIndex" : "0" },
  { "NetworkInterfaceId" : {"Ref" : "controlXface2"}, "DeviceIndex" : "1" },
],

This will define nics in the order specified by list position
"NetworkInterfaces" : [{"Ref" : "controlXface"}, {"Ref" : "controlXface2"}],

Mixing the 2 forms is supported but the resulting order is not defined.

Amazon documentation is ambigious about which form is actually supported
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-networkinterfaces
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2.html#cfn-template-snippets-eni
Fixes: Bug #1096013

Change-Id: Id387d2e750cbe533a9b8a1fedc49d5bcf690fbcf
Merge "Allow instance NetworkInterfaces to be list of str or dict"