Typos.
Fixed memory leak in the function ScanCollectionDirectory(). If the file extension is .db and it is a compaction file, 'filename' is leaked when 'newName' is assigned to it.
In the function TRI_LoadCollectionInfo(), when the value's type is a JSON string and the key is not the 'name', it checked again whether the value's type is a JSON string, instead of comparing the key with 'cid'.
In the function TruncateAndSealDatafile(), 'filename' and 'oldname' were not freed. If TRI_UNMMFile() failed, the file was not closed.
In the function OpenDatafile(), if TRI_Allocate() failed to allocate memory for 'datafile', the file was not unmapped and not closed.