Doped and codoped silicon nanocrystals: The role of surfaces and interfaces