Fix index mapping issue with LINCS on GPU
In some cases (e.g. when DD is used), coupled constraints blocks
can have constraint indices that are interleaved with other blocks.
This was not taken into account when setting up the LINCS GPU data
structures. This patch fixes that by ensuring that all coupled
constraints are added to the mapping array one after the other.
Add note in decideWhetherToUseGpuForUpdate() that we need to add
a check for this when update auto will choose gpu in some cases.
Also renamed spaceNeeded by numCoupledConstraints to avoid confusion.
Fixes #3211.
Change-Id: Ib402c5cc9fc20116496034cdc11be921586bbd15