CoFiI2P: Coarse-to-Fine Correspondences for Image-to-Point Cloud Registration