Quantum dynamical simulation of photoinduced electron transfer processes in dye–semiconductor systems: theory and application to coumarin 343 at TiO2