MEDIUM: init: use self-initializing spinlocks and rwlocks

This patch replaces a number of __decl_hathread() followed by HA_SPIN_INIT
or HA_RWLOCK_INIT by the new __decl_spinlock() or __decl_rwlock() which
automatically registers the lock for initialization in during the STG_LOCK
init stage. A few static modifiers were lost in the process, but since they
were not essential at all it was not worth extending the API to provide such
a variant.
diff --git a/src/hlua.c b/src/hlua.c
index d34aa79..820ddf5 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -121,7 +121,7 @@
  * and RESET_SAFE_LJMP manipulates the Lua stack, so it will be careful
  * to set mutex around these functions.
  */
-__decl_hathreads(HA_SPINLOCK_T hlua_global_lock);
+__decl_spinlock(hlua_global_lock);
 THREAD_LOCAL jmp_buf safe_ljmp_env;
 static int hlua_panic_safe(lua_State *L) { return 0; }
 static int hlua_panic_ljmp(lua_State *L) { longjmp(safe_ljmp_env, 1); }
@@ -7670,8 +7670,6 @@
 	};
 #endif
 
-	HA_SPIN_INIT(&hlua_global_lock);
-
 	/* Initialise struct hlua and com signals pool */
 	pool_head_hlua = create_pool("hlua", sizeof(struct hlua), MEM_F_SHARED);