Task Facet Learning: A Structured Approach to Prompt Optimization