Toric Calabi-Yau threefolds as quantum integrable systems. R-matrix and RTT relations