Capacity Region of Intelligent Reflecting Surface Aided Wireless Networks via Active Learning