Line: deep copy tables in constructor.

This should prevent lines from sharing things like extradata.
TrimHandler: write encode log to disk.

In the case that encoding was terminated abnormally, the log is read
back and supplied to the user.