Display function arguments in var docs (when applicable)

Also taking care of correctly displaying when it's not a function. In
general I try to mimic the output of the (doc xxx) function.

The generation of the docstring is a bit verbose and ugly, but I
couldn't find a way to quote correctly a (let ..) binding which would
simplify the function.
General error for cases where no error supplied.

I can't test that it works because I can't reproduce this error now :(
Time will tell.