Elastic and inelastic electrons in the double-slit experiment: A variant of Feynman's which-way set-up