Add support for short and long; bugfixes; improvements

Add support for short and long:
- long (32-bit) is available in 32-bit and huge mode(l)s only

Bugfixes:
- fix sign extension bug in casts to 'signed char' in 32-bit and huge
mode(l)s

Improvements:
- reduced code size in 16-bit versions of the compiler a little