Avoid corrupting message payload while logging.
Add more tests for function node.
Merge pull request #308 from hindessm/avoid-debug-payload-corruption

Avoid corrupting message payload while logging.
Merge pull request #309 from hindessm/more-function-node-tests

Add more tests for function node.