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 
http://codepad.org/DOG1mhlo I am not sure why it's not doing what you want...?