forward port SVN commit 645427 by coolo:
forward port SVN commit 645427 by coolo:

fix folder reference counting at least for the most
easy use of search folders

and cleaning up indentation and style while I'm at it.

svn path=/trunk/KDE/kdepim/; revision=645498

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi