Added memory allocator selection for list.
Made both list and hash table use a selectable allocator so that
users of the library can use memory tracking and the internals of
the library can use them without tracking.