As India builds its carbon market, the lessons from global failures show why protecting farmers and communities must come first