First-principles study of n- and p-doped silicon nanoclusters