Fixes for queue and stack

This patch does misc fixes in queue and stack:
* the *_new() were not handling OOM correctly ;
* the *_Contains() methods were not using the equals cb;
* the lock were not always taken when accessing internal members;
Enhance ListDictonnary

This patch enhances ListDictionnary so that you can set callbacks for
keys and for values.
Add an helper function for the Key object
Merge pull request #1801 from hardening/queue_stack_fixes

Fixes for queue and stack