(new theory) Update TheoryUF to new interface (#4944)