Remove flavor ID from identifier + refactoring

We don't want new addresses for all instance-related metrics every time
an instance gets resized.

Also factored out common elements of ID generation.