Mass-dependent time- and spatial focusing of ions in a radio frequency electric deflector: basic principles and application to the stereodynamics of chemical reactions