Cofinite graphs and their profinite completions