Thread safe terminal

Implemented `SafeTerm` monad that basically just provides `sprint` and `sprintError` which are single-threaded output to the terminal. This is probably overkill here (we could have just passed a `MVar Terminal` around) but it was educational. :wink:

Fixes issue #1.