core: add history.search

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
daemon: implement Search

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
client: implement search

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
gpaste: add search

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
history: no need for nul-termination

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
search: fix memory corruption

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
gpaste: fix leak in search

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
gpaste: print more complete results for search

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
gpaste: use getopt_long

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>