helpers: Fix fromByteArray for {{prefix}}Object and add tests
fromByteArray(QString, {{prefix}}Object) was accepting any valid json,
not just objects. Add an isObject() check so arrays and other
non-object types now correctly return false. The output value is also
left intact on failure, consistent with other overloads.
Add tests covering valid objects, invalid json, non-object json, and
an empty object case.
Pick-to: 6.11
Task-number: QTBUG-145232
Change-Id: I97760c435333a198f4a8383525b314a733359aef
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>