refactor for neovim/python-client#53
use threadsafe_call
use new function/command decorators