MINOR: lua: refactor the Lua object registration

All the HAProxy Lua object are declared with the same pattern:
 - Add the function __tosting which dumps the object name
 - Register the name in the Lua REGISTRY
 - Register the reference ID

These action are refactored in on function. This remove some
lines of code.
diff --git a/include/proto/hlua_fcn.h b/include/proto/hlua_fcn.h
index 560d1f4..9c5d908 100644
--- a/include/proto/hlua_fcn.h
+++ b/include/proto/hlua_fcn.h
@@ -5,6 +5,7 @@
 void hlua_class_const_str(lua_State *L, const char *name, const char *value);
 void hlua_class_function(lua_State *L, const char *name, int (*function)(lua_State *L));
 void *hlua_checkudata(lua_State *L, int ud, int class_ref);
+int hlua_register_metatable(struct lua_State *L, char *name);
 int hlua_fcn_reg_core_fcn(lua_State *L);
 int hlua_dump_object(lua_State *L);