add hooks for buffer opening/closing in weechat

Signed-off-by: Moritz Ulrich <ulrich.moritz@googlemail.com>
Merge branch 'master' of github.com:the-kenny/weechat.el

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

Signed-off-by: Moritz Ulrich <ulrich.moritz@googlemail.com>
Improve handling of the log-buffer

Signed-off-by: Moritz Ulrich <ulrich.moritz@googlemail.com>