Competition between excitonic charge and spin density waves: Influence of electron-phonon and Hund's rule couplings