Pakistan chief justice orders release of detainees