D-wave quarkonium production and annihilation decays: Formalism and applications.