Pulse-by-pulse multi-beam-line operation for x-ray free-electron lasers