A few improvements

Hi,

Here is a little patch that speed-up the sort function.
It also adds the ability to use a caching system.
And finaly you can configure the number of messages to retrieve per folder when selecting a label.