Refactored toString method of GermplasmInventory and ListDataInventory POJOs so as to share codes for common fields

Issue: GCP-9216

Reviewer: Aldrin