Fixed EZP-20981: REST: unable to create a new FieldType with xmltext

Fixes https://jira.ez.no/browse/EZP-20981 and also https://jira.ez.no/browse/EZP-20987 that has been discovered while solving the former.