Improve support for variable args in documentation.

Now prototypes are automatically generated with/without default arguments,
to better illustrate that they are optional.
Improve global function documentation.