Place the chicken breast-side up in a high-sided pot that fits the chicken snugly. Fill the pot with cold water to about 1 inch above the chicken and bring to a boil over medium-high heat.
While waiting for the water to boil, cut the ginger into very thin rounds, peel and quarter 1 of the onions and add them and 1 tablespoon salt to the pot.
Once the water reaches a boil, reduce to a simmer and cook, skimming and discarding any scum that floats to the surface of the poaching liquid, until an instant-read thermometer inserted between the breast and thigh of the chicken reads 165 degrees F, 30 to 35 minutes. (To take the temperature, use a pair of sturdy tongs to carefully lift the chicken out of the hot poaching liquid and insert the thermometer between the breast and thigh.)
While the chicken is cooking, core the white and purple cabbages, very thinly slice them into ribbonlike strands and place the sliced cabbage in a large bowl; set aside.
Fill a second large bowl a little more than halfway with equal parts ice and water, and use the tongs to add the cooked chicken to it; reserve the pot and poaching liquid. Leave the chicken in the ice water to cool completely, about 10 minutes.
Meanwhile, peel, halve and very thinly slice the remaining onion, and place it in a small bowl. Add the vinegar, oil, 1 teaspoon of the sugar, 1/4 teaspoon salt and 1/4 teaspoon black pepper. Use your hands to gently massage the vinegar mixture into the onions until they begin to wilt slightly. Let the marinated onions sit at room temperature for at least 15 minutes and up to overnight.
Discard the ice water, but keep the chicken in the bowl. Remove and discard the skin. Shred the chicken into large bite-size pieces; set aside.
Add the chicken carcass to the poaching liquid, and return it to a simmer. Cook for 30 minutes, skimming off any fat and/or scum that floats to the surface. Strain the poaching liquid over a large bowl; discard the solids. Let this flavorful broth cool completely, and reserve it for another purpose. (It can be frozen in an airtight container for up to 3 months.)
While the broth is cooking, make the dressing: Cook the remaining sugar and 1/4 cup water in a small saucepan over medium heat, stirring occasionally, until the sugar has completely dissolved, about 5 minutes. Remove to a small bowl and let cool slightly.
While the sugar mixture is cooling, finely grate the garlic, halve and juice the limes (about 1/2 cup of juice total) and slice the chiles into thin rounds. Whisk the fish sauce into the cooled sugar mixture; add the garlic, lime juice and chiles.
To assemble the salad, add the chicken, marinated onions (and any residual liquid) and lime dressing to the cabbage bowl. Tear the mint and basil leaves into the bowl, and gently toss to combine. Season with additional fish sauce if needed. Let the salad sit for 15 minutes so the flavors can marry, then transfer to a large platter. Place the peanuts and fried shallots in separate piles beside the salad. Just before serving, gently toss together the salad, peanuts and fried shallots and any liquid that has accumulated at the bottom of the platter (the liquid has a lot of great flavor). Serve with the fried shrimp chips.
Fried shrimp chips are found in Asian specialty shops.
Recipe copyright William Granger, August 2003