Fix unit test for SyslogLogger.
Fix the conditions to check for (to/from)((J/B)son/String) in (de)serialize(J/B)son to require both, from and to methods.

The previous change caused all objects to be serialized as strings due to Object.toString. Also added new type based unit tests from #306.