1. Add half the onion, 2 cloves of the garlic, the rosemary and thyme sprigs to a pot of lightly salted water. Bring to a boil. Reduce heat to a simmer and add chicken. Simmer for 10 to 12 minutes, until cooked through. Using tongs, remove chicken to a cutting board and keep warm.
2. Return water to a boil. Add orecchiette. Cook for 9 minutes. Drain, removing rosemary and thyme stems.
3. Meanwhile, heat oil in a large skillet over medium heat. Add remaining onion; cook for 3 minutes. Add remaining 2 cloves garlic and 1 tbsp each chopped rosemary and thyme; cook for 2 minutes. Stir in flour; cook for 1 more minute. Slowly whisk in milk; bring to a simmer and cook for 5 minutes, until thickened. Stir in goat cheese, salt and pepper.
4. Thinly slice chicken. Add to sauce with cooked orecchiette; stir well. Serve with chopped pistachios, if desired.