toolbox: Add missig include

Added missing include of <limits.h>.
toolbox: Add missing sources to toolbox

Some sources have not been comitted yet although they should have been.
toolbox: Add safe array (re)allocations