[FIX] Faster and clever way to fix e0ec520d00

As title say faster way to correct the filetype field behavior.
(A lot since std::set use key as index while CFileItemList.Get on filename needs locks and tons of overhead, not talking about the size of parameters compared to a large directory).
Merge pull request #2871 from Tolriq/faster_fix_filetype

jsonrpc: faster and better way to fix "filetype" property than e0ec520d00