Update theory rewriter ownership, add stats to strings (#4202)