Search for new physics in dijet angular distributions using proton-proton collisions at $\sqrt{s}=$ 13 TeV and constraints on dark matter and other models