Learning Accurate Dense Correspondences and When to Trust Them