[4.2] Add fromJson method on Collection

Allows to make a collection from a JSON string.
When `$strict` argument is set to `false` and the JSON string is not valid, the collection will be filled with an empty array.

Closes #4537