Accounting for single value fields in entitymetadatawrapper on entityref...

...erence fields when setting value.

If the cardinality is 1, entitymetadatawrapper expects a string rather than an array. I added logic for this on entityreference fields. I tried globally, but doing so broke other tests. At some point, we should probably look into how to best handle the cardinality issue when setting values.
Debugging