Electrolysis method of intercalation of layered transition metal dichalcogenides