Refactoring

- all WAV writing code moved to a separate unit (wav.c/wav.h);
- changed VERSION macro name to ASMSX_VERSION to avoid clash with any
other VERSION macros;
- replaced hard-coded magic value 0x100 with ASMSX_MAX_PATH macro, kept
the value as is at 0x100;
- moved shared constants and function prototypes from core.y to asmsx.h
file;
- added some explicit type casting to core.y to suppress compiler
warnings;
- updated build scripts and makefiles to support changes above.