Preparation of thiols, sulfides, hydropolysulfides or polysulfides of hydropolysulfides or polysulfides