Add unittests

Unittests for:

- search/result

- util

- preferences
Remove pointless unittest (search/result)
Merge pull request #4321 from owncloud/add_unittests_kondou

Add unittests