Eng 6095 other key type

Use the same strategy to add a pointer for other key type.

Change the type of the tuple pointer in TupleKey for the compile success of the shared API. 

Abstract the common variable and methods into a base class.