extracted formatting logic in a separate file

It is now possible to assign to ⎕ or ⍞ (i.e. write to stdout) from
compiled APL programs.