Interactive Learning with Pricing for Optimal and Stable Allocations in Markets