The Nahm transform of spatially periodic instantons