utils: fall back to text node

* Falls back to text node should parseString raise ExpatError
  when calling record_add_field with erroneous data.

* Adds a test to cover this case.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>