New version of function signature parser.

The new version supports operators and is more resilient to the input
format variations. It should no longer get confused by the space
characters between the function name and the opening parenthesis.
Minor optimizations.