Interplay of lattice, electronic, and spin degrees of freedom in detwinned BaFe2As2 : A Raman scattering study