Measurements of the pp $\to$ W$^\pm\gamma\gamma$ and pp $\to$ Z$\gamma\gamma$ cross sections at $\sqrt{s} =$ 13 TeV and limits on anomalous quartic gauge couplings