working on getting rid of pipes from plugin to main for terminals
fixed child thread join hang bug

when a plugin attempted to kill a child process
created for a terminal, the master pty associated with
that terminal was not being found as readable by
the select call in child_io_loop and thus when
the plugin joined the IO loop thread, it was getting
stuck. this isnt exactly fixed, as i have no idea why
this happens, but opening a file before forking the child
(so both processes share the descriptor) fixes the issue.
obviously i have no idea why this works.
added some documentation on when terminal_terminated is accurate
refactored child_io_loop to allow multi-thread refreshing

now all the relevant variables to refresh timing are stored
in the module structure (which is synchronized by mutex) so
that a thread besides the IO loop thread can cause a refresh
to happen.
implemented termina_input and terminal_input_chars api calls

still working on testing it properly
tests for writing to api terminal
remove terminal panel before exit
added test for running a terminal in an edge window

causes an error in the screen module:
  the code that attempts to create a terminal on the
  top edge of the screen boxes the actual window
  and derives a subwindow for the terminal. when
  the screen module tries to resize everything and
  reallocate all the edge windows it is unable to
  destroy the window because the derived window
  must be destroyed first.

  this problem will be fixed by the implementation of
  a callback which is invoked when an edge window is
  about to be deleted.
implemented win_alloc callback for when the window is destroyed

allows the plugin the chance to clean up any resources associated
with that window (e.g. derived windows).