Rewrite func_log()

This PR 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>~~ @TheNeikos 
Suggested-by: ~~Marcel Müller <com2040@gmail.com>~~ @TheNeikos 
This is unnecessarily verbose.