Fix missing include
Rename "private" list functions and add function to move item

The list move function can move an item to another position in the list, or
into another list.
Function to initialize a sprite object

Fields that are always assumed to be set to a valid value are preset to their defaults.
Fix possible memleak

NULL is (usually) a valid value for sprite->path. It should always be set,
either to NULL or to a valid rstring.
Fix a debug message
Fix possible out-of-bounds array access
Add return value to list_erase()

list_erase() returns an iterator to the next item in the list, or to list_end()
if the erased item was the last item in the list.
Fix a comment
Fix error in tile encoder

If the first pixel is the only non-transparent pixel on the line, it was happily
skipped as if the whole line was transparent.
Fix some debug messages
Const-ness fixes

Mark list parameters as const where we don't change the list itself. This makes
it possible to carefully use these functions where the list is a member of a
non-mutable structure.
Move list_push_back() function to the right section
Add sprite and GRF file writer functions
Check gcc warning flags

Older versions of gcc do not support for example -Wno-variadic-macros
Fix typo in comment
Use EFBIG instead of EOVERFLOW

EOVERFLOW is not available everywhere