Charge-controlled magnetism in colloidal doped semiconductor nanocrystals