Topological completions and M-spaces