Added include required for debug build
Linking needs more cowbell and libm
Documented color difference formula
Correct palette index guesses when smaller palette is picked

Fixes #39.
Documentation
Erase palette when freeing it

To make use-after-free more obvious
Fix subtle memory leak because of order of struct initialisation.
Merge pull request #43 from rolftimmermans/memory-leak

Fix subtle memory leak because of order of struct initialisation.
Solve array index out of bounds probem in nearest_search.
Fix guesses only when needed
Consistent naming
Clamp alpha dithering separately from colors

Fixes #30