MINOR: shctx: Shared objects block by block allocation.

This patch makes shctx capable of storing objects in several parts,
each parts being made of several blocks. There is no more need to
walk through until reaching the end of a row to append new blocks.

A new pointer to a struct shared_block member, named last_reserved,
has been added to struct shared_block so that to memorize the last block which was
reserved by shctx_row_reserve_hot(). Same thing about "last_append" pointer which
is used to memorize the last block used by shctx_row_data_append() to store the data.
diff --git a/include/proto/shctx.h b/include/proto/shctx.h
index 55cb2a7..13e00c7 100644
--- a/include/proto/shctx.h
+++ b/include/proto/shctx.h
@@ -32,11 +32,13 @@
 #endif
 
 int shctx_init(struct shared_context **orig_shctx, int maxblocks, int blocksize, int extra, int shared);
-struct shared_block *shctx_row_reserve_hot(struct shared_context *shctx, int data_len);
+struct shared_block *shctx_row_reserve_hot(struct shared_context *shctx,
+                                           struct shared_block *last, int data_len);
 void shctx_row_inc_hot(struct shared_context *shctx, struct shared_block *first);
 void shctx_row_dec_hot(struct shared_context *shctx, struct shared_block *first);
 int shctx_row_data_append(struct shared_context *shctx,
-                          struct shared_block *first, unsigned char *data, int len);
+                          struct shared_block *first, struct shared_block *from,
+                          unsigned char *data, int len);
 int shctx_row_data_get(struct shared_context *shctx, struct shared_block *first,
                        unsigned char *dst, int offset, int len);
 
@@ -180,6 +182,19 @@
 
 /* List Macros */
 
+/*
+ * Insert <s> block after <head> which is not necessarily the head of a list,
+ * so between <head> and the next element after <head>.
+ */
+static inline void shctx_block_append_hot(struct shared_context *shctx,
+                                          struct list *head,
+                                          struct shared_block *s)
+{
+	shctx->nbav--;
+	LIST_DEL(&s->list);
+	LIST_ADD(head, &s->list);
+}
+
 static inline void shctx_block_set_hot(struct shared_context *shctx,
 				    struct shared_block *s)
 {