Some cleanup and fixes

This simplifies how the number of arguments for various functions are checked. It also fixes multiple places where the number of arguments that were being checked for differed from what the error messages claimed as acceptable.

The last commit indeed replace those error messages by generic ones, which should be easier to maintainer. Since these errors should in 99.9% of all cases only be seen by package authors (or, indeed, only the AutoDoc authors themselves), I think this is a good tradeoff, as developers should be able to determine the acceptable number of arguments by inspecting the code surrounding the Error().