Added a global ncurses mutex to fix rendering bugs

Ncurses is not thread safe. Go is very threaded, this causes many
issues when updating multiple areas at the same time. To fix this
I have added a global lock, and moved the goncurses code into go
functions, which grab and release that lock. This ensures that no
two goncurses code segments are running concurrently. And thus
no graphical errors.
Cleaned up main.go in response to curses bug fix.
Fixed chat rerendering logic to include on focus