Add tests for ve.dm.InternalLists

Also fix clone method when no document supplied.

Change-Id: I7b24e8622049c6293fa0ef813696d5d91a901e75
Merge "Add tests for ve.dm.InternalLists"