Make format-out, force-out thread safe.

As requested in http://bugzilla.opendylan.org/show_bug.cgi?id=4004.