A comprehensive theoretical picture of E centers in silicon: From optical properties to vacancy-mediated dopant diffusion