Update clean FHIR resource logic:
- remove fields with null/undefined value
- remove fields with empty object/array as a value
- trim null/undefined elements of array value
- keep null/undefined elements in the array value if there is
- non empty element with higher index