The chemistry of dense interstellar clouds