Structure and electrochemical properties of intercalation compounds in the system silver-titanium disulfide, AgxTiS2