Hash device_id only if it is longer than the allowed MAX size for NVP
This ensure that a VM uuid stays untouched, avoiding potential
confusion when inspecting NVP port tags. This patch also abstracts
the hashing method out by introducing a device_id_to_vm_id method.
Filtering logic is preserved, and a test has been added to ensure
that. However such a logic is not currently used in the NeutronPlugin
(because of the introduction of async status updates), but it has
been added as utility method to nvplib.
Fixes bug #
1215204
Change-Id: Ib96ecae438e30f195c8b45176abc1cf55b4b363f