Eliminate duplicate code

Since we have introduced the reusable tools for identity serdes, this patch migrates current APIs to use the common code.

Change-Id: I2ccfbd25ddcfd704fcec6d0bcb2d4fcefd94bcab
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "Eliminate duplicate code"