Fix several more crash bugs.
These were caused by attempting to use nick completion with no buffer open and deleting buffers/networks while Quasseldroid was in the background.