Quantum systems with time-dependent boundaries