MEDIUM: pattern: use ebtree's longest match to index/lookup string beginning

Being able to map prefixes to values is already used for IPv4/IPv6
but was not yet used with strings. It can be very convenient to map
directories to server farms but large lists may be slow.

By using ebmb_insert_prefix() and ebmb_lookup_longest(), we can
insert strings with their own length as a prefix, and lookup
candidate strings and ensure that the longest matching one will
be returned, which is the longest string matching the entry.
diff --git a/include/proto/pattern.h b/include/proto/pattern.h
index 40e87b8..4a969ac 100644
--- a/include/proto/pattern.h
+++ b/include/proto/pattern.h
@@ -69,6 +69,7 @@
 int pat_idx_list_reg(struct pattern_expr *expr, struct pattern *pat, char **err);
 int pat_idx_tree_ip(struct pattern_expr *expr, struct pattern *pat, char **err);
 int pat_idx_tree_str(struct pattern_expr *expr, struct pattern *pat, char **err);
+int pat_idx_tree_pfx(struct pattern_expr *expr, struct pattern *pat, char **err);
 
 /*
  *