extapi: support serializable interfaces

we may need to manage serializable form of the entities for ejb and
other technologies that enforce serialization.

Change-Id: I79e29ec5067b87687024c7426f54625a2f89ca35
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>