VM diagnostics: add serializer to Diagnostics object

The serializer will enable the API to return a dictionary to the
user.

Part of the blueprint v3-diagnostics

Change-Id: If86a94cba98745acbc9976fa7354c98ec6716ac0
Merge "VM diagnostics: add serializer to Diagnostics object"