Add to-string functionality for ws_value_union type
Rewrite func_log()

This patch completely rewrites the func_log() function to be able to
parse ws_value_* types into their string representation and log them.

Pair-programmed-with: Marcel Müller <com2040@gmail.com>
Suggested-by: Marcel Müller <com2040@gmail.com>