Don't put define-funs in model output; bug 411 testcase no longer relevant.
Partial kind branch merge, including new --rewrite-apply-to-const feature.
Minor cleanup.
Remove a regression for which the portfolio takes forever (see bug 542).