Fix out of memory crash on large xml (danida-all.xml), this was caused by iconv using too much memory when asked to sniff the character encoding.
Now it just sniffs the first 1024 bytes which should be faster and more stable and only a little bit less precise.
Merge branch 'master' of github.com:devinit/D-Portal