Explicitly set search paths for libraries build.

The libraries build is prepared to work with binaries not part of the current
working tree. But in this case the default search path surely points to some
other working tree. Even the binaries in this working tree might have been
compiled with non-standard builtin search paths.

Anyway when building the libraries we want always to use the headers from
the current working tree. Therefore we want to set them explicitly. Instead
of setting all in all five paths on the command lines of ca65, cc65 and ld65 I
opted to just set the single environment variable.
Added library reference em_libref to EMD interface.

Occasionally dynamically drivers suffer from not being to refer to
content in the C library. Therefore I added a mechanism to allow
a C library for a certian target to define a symbol that will be
handed over to dynamic drivers for that target. Then the drivers
can use their refernce to that symbol to access content in the C
library.
Added library reference joy_libref to JOY interface.
Added library reference mouse_libref to MOU interface.
Added library reference ser_libref to SER interface.
Added library reference tgi_libref to TGI interface.
Use unique variables for cc65 toolchain.

Originally I used the usual variables (like $(CC) and $(CFLAGS) ) but after
all this doesn't make sense as any predefined values and/or user defined
settings can only be wrong.
Added support for 'prefix'.

If the variable 'prefix' is defined then the builtin search paths are set to
$(prefix)/lib/cc65/... allowing to build binaries intended for installation.

Note that the library build still works with these binaries as it generally
overrides the builtin search paths by setting the CC65_HOME env var.
Use symbolic names for all CIO commands.
remove TABs
Merge pull request #14 from groessler/something_to_pull

Use symbolic names for all CIO commands.
Avoid GCC "unconst" warning.
Have __APPLE2ENH__ imply __APPLE2__ and __ATARIXL__ imply __ATARI__.
Avoid macro redefinition of CH_DEL for apple2enh.

I'm wondering why MS VC++ didn't complain about this...
Simply define CH_DEL exactly then when there none yet.
Fix writing one byte beyond screen buffer.
Merge pull request #15 from groessler/something_to_pull

Fix writing one byte beyond screen buffer.
Fixed comment.
Fixed comment.
move findfreeiocb function into its own object file