Debug panel : change json_encode/decode to serialise/unserialise

Fixes #933 
To prevent non-UTF characters error
I am not sure as for
>  htmlspecialchars(var_export($value, true), ENT_QUOTES|ENT_SUBSTITUTE, \Yii::$app->charset, TRUE)

but it seems like an overkill to create a separate encode function for single use