Volkswagen has said it is willing to consider building equipment for the German military as part of Europe’s efforts to rearm.