Heavy quark masses in the continuum limit of quenched lattice QCD