PRD-4565:  Added back logic to handle canonical function match and adjus...

...ted logic to handle catch-all flag.  Fixed getParameterCount() as it was always returning the number of parameter fields without regards to if there is any values in there.  Fixed catch-all logic.  Added more test cases.