Raise InvalidTemplateReference for missing resources

Previously this code raised InvalidTemplateAttribute when a resource
doesn't exist. But our existing code (in the dependency check, which
executes first) raises InvalidTemplateReference in this case and reserves
InvalidTemplateAttribute for when the resource exists but the attribute is
invalid. This patch makes the functions consistent with that behaviour.

It also raises InvalidTemplateReference, instead of KeyError, in the same
case in get_resource. I assumed that this could never fail, but that is
only true for Ref, not get_resource.

Change-Id: Ib7dcd3333bc2fc7778d3a013abae10c5795086dd
Deprecate first_address attribute of Server

Currently we could use get_attr function to get necessary information
about ip addresses. So attribute first_address could be deprecated.
According to idea above mentioned attribute should have DEPRECATED
status.

Change-Id: I7aeac8d3a677bbb35d0140ca371def1d65ffd2cc
Closes-Bug: #1302466
Merge "Raise InvalidTemplateReference for missing resources"