Cleanup in ResourceExtension ALIAS(v2.1api)

Add global variables ALIAS if it's not existing and use it in
ResourceExtension if the the alias of the extension happen to be
the same as ALIAS.

Partially implements blueprint v2-on-v3-api

Change-Id: Id6b3ecde499e9b54804175d635b89e62c1fed804
Merge "Cleanup in ResourceExtension ALIAS(v2.1api)"