Only fire events if arg/cmd table are provided

This makes it easier to write a generic doc event handler.
We only fire the events related to arguments (synopsis and
options) if we have an arg table.  Otherwise code has to check
this in the handler themselves, or write custom handlers that
don't define the doc_* methods so they won't be called.