Add stack id metadata to the resources

As a temporary work-around until Heat has a solution for automatically adding metadata to stack resources, adding this metadata to the supported templates.