Close extended chat window

This is an enhancement to the way the chatbox UI works. Ensures that there is always a title bar, even when chatbox is maximized. There is also a minimize button to get out of the maximized chatbox mode.

This should help resolve issue #1827 although does not go as far as adding the 3 button interface as suggested.