compute: tweaks to vm_mode APIs to align with arch/hvtype

Rename the 'name' method to 'canonicalize' to make its purpose
clearer. Also add a 'is_valid' method to check validity without
doing canonicalization. Make it use a specialized exception
class instead of the generic 'Invalid' class.

Related-bug: #1348629
Change-Id: I4bb972aeafb69be594bff40eded3cfeec22f0bef
Merge "compute: tweaks to vm_mode APIs to align with arch/hvtype"