In a medium-sized bowl, mix together the grated onion, minced garlic, salt, and pepper. Add the chicken pieces and toss until evenly coated. Cover the bowl and let the chicken marinate for about 1 hour.
In a large bowl, combine the chili paste, ketchup, granulated sugar, toasted sesame seeds, and lemon juice. Taste the mixture and adjust the flavors as needed to achieve a balanced spicy-sweet-tangy profile.
In a large heavy pot, pour in enough oil to reach a depth of 1½ inches. Heat the oil to 350 degrees. Meanwhile, in a shallow bowl, combine the all-purpose flour and cornstarch. Season the mixture with salt and pepper. In batches to prevent overcrowding, remove chicken from the marinade. Lightly coat each piece with the seasoned flour and cornstarch mixture. Gently drop the coated chicken into the hot oil and fry for 5 to 7 minutes, turning occasionally, until they turn golden brown and crispy. Drain the fried chicken on paper towels. Repeat this process with the remaining chicken pieces, ensuring to check the oil temperature between batches.
For wings only, once all pieces are fried, increase the oil temperature to 375 degrees Fahrenheit. Refry the chicken wings in batches for 30 to 60 seconds, until they become very crisp. Drain the refried wings once again on paper towels. While the chicken is still hot, generously brush each piece with the prepared chili sauce. Serve the hot chicken immediately, sprinkled with sesame seeds.