Fix function definition syntax check

Bison grammar rule for function definition allows too much, therefore
some contextual checks must be done, i. e. only functional declarators
should be accepted, other should be reported as syntax error.
Do not report error when function's declaration and definition are separated

There can be only one definition. The definition can be followed and
preceded by any number of declarations, but the return type and types
of parameters must match in all declarations and definition.
Fix bug that disables defining commands/events returning pointers