Bug 829520 - [Email] Folder sorting breaks the displayed folder hiearchy

r=@asutherland from https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/125

Tests in the GELAM commit, as usual.