don't use argument by reference in doubleLink()

* doubleLink(): update to distinguish input and output data
* getPrevIDforRack(): use function superposition
* getNextIDforRack(): idem
* getProximateRacks(): idem