INT-2955 Fix Collection/Map Conversion

The fix for INT-2650 (to avoid unnecessary array copying) was
too general in that it also prevented types in collections and
maps from being converted.

Add tests to illustrate that such payloads are not converted.

Change code to only short circuit the conversion process if
the payload is a primitive array.

An existing test ensures that arrays are not copied.

Add more tests to complete coverage - discovered another
bug - the early exit after using a property editor to convert
to a String was never taken - it was testing against the
Class of the TypeConverter instead of the Type. If the
target type is a String, we don't need to perform
conversion after the property editor has done its
conversion.

Fix MessageHistory test (was testing MessageHeaders).
Merge pull request #761 from garyrussell/INT-2955

* INT-2955: Fix Collection/Map Conversion
INT-2954 (S)FTP Fix AutoCreate Top Level Dir

When autocreateDirectory is true, and the top level directory
did not exist, the mkdirs failed because the adapter tried
to create a directory name with a zero length string.

This caused an 'String index out of range: 0' exception in
SFTP.

Stop iteration when 'pathSegment' is zero length.
Merge pull request #773 from garyrussell/INT-2954

# By Gary Russell
* INT-2954:
  INT-2954 (S)FTP Fix AutoCreate Top Level Dir