CAPITAL: Optimal Subgroup Identification via Constrained Policy Tree Search