Production of excited charm and charm-strange mesons at HERA