[pmc2c] fix optional args and check param_count in methods

check the run-time arity of CallContext for the number of provided
args and fail if wrong. Use the param_count for proper
:optional and :opt_flag handling