Superconductivity and Antiferromagnetism in NdNiO$_2$ and CaCuO$_2$: A Cluster DMFT Study