performance optimiazions

use a macro-based linkedlist (coming from freebsd kernel) instead of using the thread-safe
linklist provided within libhl which is more richful in terms of api but slower because it
involves locks which are not necessary for the way it's used in hashtable.c (where there are
other means to ensure synchronized access to the internal buckets).

Also using spinlocks instead of mutexes since the retention time is very low and mutexes
result more expensive in most scenarios where the hashtable would be used
optimized version of the iterator

which doesn't make use of pick_value()