EXP-2: Ensure that a mutable list is passed to getEntityId.

When constructing the entityId, the getEntityId method may modify the contents
of the incoming list argument. This is the case if one of the components is an
integer but the table layout declares that the component is a long so a type
promotion will happen and component list will be modified in place. If this list
happens to an immutable list (which is the case when you use Scala to Java
conversions), an exception is thrown. Therefore, this simple copy ensure that a
mutable list is always given to the getEntityId method.

reviewer: Taton, Renuka