[stubgen] Fix a few bugs with stubgen of c modules (#11096)
* [stubgenc] Fix bug when inferring signatures with no args
* [stubgenc] Add self arg when it is omitted from docstring signature
* [stubgenc] Use 'cls' as self arg for classmethods without signature info