Introduce .cmd() and .send() syntax for exported script functions

This patch adds .cmd() and .send()+collectIfDone() syntax for an exported script function
just like for a C++ operation. The patch consists of 3 parts:

1. Cleanup in CmdFunction and CallFunction : removed unused variables
2. Adding logic into the ExpressionParser to detect the case of script functions.
   Since they don't have true SendHandle objects and use SendStatus datasources,
   the parser needs to re-arrange some data sources when handling a 'SendHandleAlias'.
   The SendHandle of a script function is effectively the alias to the .send() function,
   + that a .reset() is not forwarded. Evaluating a SendHandle of a script function is
   the same as writing sh.collectIfDone().
3. Added unit tests in state_test to test all these cases.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>