friend class without a namespace

The friend testclass is outside the namespace so we have to tell gcc
that thsi calss exists outside a namespace. for older gcc it is nessarry
to also hold the forward declaration of the class.
Made journal plugin optional.
Disable unsupported views.
Search for search collections without etm.

This makes the system less error prone and fixes issue #3914

KOLAB: #3914