WIP: server/share: add support for search mode

http://camlistore.org/issue/512

Change-Id: I1e671f4fa3cabb9fd4844abddb7297d23eebeee3