Fix EZP-22437: JSON decode result is not checked in the input parser

JIRA: https://jira.ez.no/browse/EZP-22437

# Description

The current REST JSON input parser only calls the json_decode() PHP function without any further checking. As a result, if the JSON is invalid, you only get an error message due to NULL being used as an array.

This patch changes the JSON input parser to behave like [the XML one](https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/REST/Common/Input/Handler/Xml.php#L102).

# Test

unit tests + manual test