refactor torrent.cpp

there's still a bug with getFileMetaDataString.