Keep track of reference's index in referenceview

Keeping track of the reference's index within a statementview's list of referenceviews
allows determining whether the referenceview's value still matches the initial one.

Change-Id: I14d2a6ba86dcd9c8619e2eff5b60d81df287ae1b
Merge "Keep track of reference's index in referenceview"