The Stack of Yang-Mills Fields on Lorentzian Manifolds