bank32: make passive provision for awkward boxes with low 32K switching

This allows you to define them as a 32K paged system and use the provided
swap and page hooks, plus your switch functions to copy blocks between the
spare parts of the high 32K and the pages they are stashed in.

This means that with a typical usage model of a single large app performance
will basically be as good as a sensible layout, and only if you have two
larger apps actively running at once will it degrade much.

This will be pretty much essential to cover the uBee and the N8VEM-2.
unbanked: Update comments

Will pointed out the comments in unbanked about Z180 were bogus, and indeed
were also out of date.

Also turns out we can't have the kernel at physical 0 and banks for user
copy and for udata on the Z180 as the N8VEM-4 and probably others have ROM
at physical 0
crt0: Correct environment and argument parsing

From: Will Sowerbutts

kernel sets up the stack differently: argc, argv, environ[]
ultoa: this one escaped the pruning

Noted by Will Sowerbutts
putenv: Fix NULL environment handling

From: Will Sowerbutts
init: Fix environment handling

From: Will Sowerbutts
devsys: note a Z80 assumption to fix
syscall_exec: Introduce the notion of both a base and a load address

Eg on Z80 our base is 0 but we load at 0x200. On 6502 our base and load
are going to be higher and the same, ditto probably 6809
bank16/32k: compute common area allowance

We propogate the common into each high bank so must allow for it. Remove
the hardcoded 4K assumption as it's trivial to do so, and also socz80 at
least doesn't need 0xF000 to be the common base.
usermem: always trap NULL pointers

Low vectors are hard due to the cp/mn emulation
pagemap_realloc: This is the amount of memory neede relative to BASE not LOAD

Now we have a clear divide fix up the broken assumption
nc100: Correct tty code

Update the nc100 specific tty code to match the new combined terminal structure
nc100: Update to put platform _kernel_flag in common
types: rework the types for the BASE/TOP configurations

This makes it a fair bit cleaner
mm: remove fairly useless and non-portable optimisation hack

Far better to optimise usercopy functions if you need to
_open: fix static corruptor

We can block in a tty open, which if another open then occurs leaves
the staticfast "ino" corrupted. Save it in a temporary variable so that
for we still get almost all the benefit of staticfast here.
vdp: Create a shared device area

We want this as there are MSX1 boxes with MSX2 memory mappers (or from our
viewpoint MSX2 boxes with MSX1 video). In addition it turns out that the VDP
used on the Memotech MTX series machines is basically the same beastie.
z80pack: fix comment
commonmem: add a standard Z80 commonmem to .include
commonmem: switch some platforms to using the new .include