Fixes bugs in String marshalling.

Fixes two issues:
1. FreeStringArrayPtr used the wrong variable in the offset to
ReadIntPtr causing an access violation.
2. Better cleanup of memory in MarshalStringArrayToPtr when any alloc
fails.
Merge pull request #141 from Frassle/marshal

Fixes bugs in String marshalling.