Allow passing index when adding a Reference to a ReferenceList

In order to allow more flexibility when adding a Reference to a ReferenceList,
an index may be specified. This allows inserting a Reference at an other place
than at the end.

Change-Id: I38031e6eae6bed107241e4a9c34a67c7c7abee13
Merge "Allow passing index when adding a Reference to a ReferenceList"