Skip IMAP folders with names that are not correctly encoded.
Skip IMAP folders with names that are not correctly encoded.

Configure the CharsetDecoder to throw an exception if malformed input
is encountered. Not doing this can cause an endless loop that
allocates memory until the application dies with an OutOfMemory error.
Until we have support for both a folder display name and a raw folder
name we simply ignore folders with names that aren't correctly encoded
with the modified UTF-7 variant.

Fixes issue 3268

Credits: Bernhard Redl (aatdark) analysed the problem and wrote the
initial version of the fix.
mawiegand/k-9,GuillaumeSmaha/k-9,dgger/k-9,sonork/k-9,XiveZ/k-9,G00fY2/k-9_material_design,philipwhiuk/k-9,dhootha/k-9,WenduanMou1/k-9,huhu/k-9,cooperpellaton/k-9,farmboy0/k-9,WenduanMou1/k-9,rollbrettler/k-9,tonytamsf/k-9,tsunli/k-9,github201407/k-9,KitAway/k-9,k9mail/k-9,tsunli/k-9,herpiko/k-9,sanderbaas/k-9,bashrc/k-9,gilbertw1/k-9,nilsbraden/k-9,moparisthebest/k-9,dgger/k-9,konfer/k-9,Eagles2F/k-9,gnebsy/k-9,gnebsy/k-9,torte71/k-9,cketti/k-9,gilbertw1/k-9,philipwhiuk/q-mail,sebkur/k-9,ndew623/k-9,imaeses/k-9,cketti/k-9,cliniome/pki,Eagles2F/k-9,vasyl-khomko/k-9,deepworks/k-9,tonytamsf/k-9,github201407/k-9,ndew623/k-9,rtreffer/openpgp-k-9,torte71/k-9,vt0r/k-9,dhootha/k-9,439teamwork/k-9,k9mail/k-9,farmboy0/k-9,sonork/k-9,dgger/k-9,philipwhiuk/q-mail,leixinstar/k-9,rishabhbitsg/k-9,vasyl-khomko/k-9,tsunli/k-9,GuillaumeSmaha/k-9,icedman21/k-9,439teamwork/k-9,icedman21/k-9,gaionim/k-9,gaionim/k-9,nilsbraden/k-9,jca02266/k-9,denim2x/k-9,crr0004/k-9,msdgwzhy6/k-9,rishabhbitsg/k-9,cooperpellaton/k-9,suzp1984/k-9,rtreffer/openpgp-k-9,jberkel/k-9,jca02266/k-9,dhootha/k-9,tonytamsf/k-9,cketti/k-9,leixinstar/k-9,sebkur/k-9,herpiko/k-9,bashrc/k-9,cliniome/pki,herpiko/k-9,gnebsy/k-9,439teamwork/k-9,XiveZ/k-9,G00fY2/k-9_material_design,sedrubal/k-9,leixinstar/k-9,KitAway/k-9,sebkur/k-9,sonork/k-9,vasyl-khomko/k-9,torte71/k-9,rollbrettler/k-9,jca02266/k-9,vt0r/k-9,vatsalsura/k-9,k9mail/k-9,ndew623/k-9,sanderbaas/k-9,nilsbraden/k-9,gaionim/k-9,thuanpq/k-9,imaeses/k-9,crr0004/k-9,philipwhiuk/q-mail,mawiegand/k-9,farmboy0/k-9,moparisthebest/k-9,sedrubal/k-9,bashrc/k-9,WenduanMou1/k-9,deepworks/k-9,crr0004/k-9,roscrazy/k-9,cketti/k-9,msdgwzhy6/k-9,moparisthebest/k-9,huhu/k-9,indus1/k-9,suzp1984/k-9,philipwhiuk/k-9,suzp1984/k-9,thuanpq/k-9,thuanpq/k-9,msdgwzhy6/k-9,denim2x/k-9,github201407/k-9,denim2x/k-9,huhu/k-9,imaeses/k-9,cliniome/pki,Valodim/k-9,roscrazy/k-9,Eagles2F/k-9,konfer/k-9,CodingRmy/k-9,CodingRmy/k-9,mawiegand/k-9,rollbrettler/k-9,cooperpellaton/k-9,jberkel/k-9,sanderbaas/k-9,indus1/k-9,dpereira411/k-9,KitAway/k-9,dpereira411/k-9,dpereira411/k-9,GuillaumeSmaha/k-9,icedman21/k-9,vatsalsura/k-9,deepworks/k-9,XiveZ/k-9,konfer/k-9,gilbertw1/k-9