Fix some compilation warnings
Fix even more warnings
Add prototype for dict_swap_with_next() to dict.h.

This also fixes a warning about an implicit function declaration.
Fix some more warnings about bad code style.
Fix last warning about losing a "const".