Optical nonlinearities and carrier trapping dynamics in CdS and CuxS nanocrystals