net: lwm2m: Improve JSON content encoder/decoder error handling
net: lwm2m: Improve JSON content encoder/decoder error handling

It's now possible to return an error code instead of 0 where
appropriate.

Signed-off-by: Robert Lubos <9d28997c6894a2d0321a7bb399169af7ce99b64e@nordicsemi.no>

zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,galak/zephyr,galak/zephyr