Fixing some types

int_fast8_t might be a type wider than 8 bits, in which case the compiler may decide that
the unsigned value of 'code' can be represented in that signed type, thus instead of
getting a negative number we get a positive one, which then screws up computation
totally.

Also use the fastest types for 'length' and 'offset' that are at least 16 bits wide.
Add reference to comment

Apparenty this feature is either only planned or not available in every TTD version.