Add preliminary PE/COFF support

kernel/Makefile:
	register pe.s

kernel/pe.s:
	PE32 and COFF parser.

kernel/shell.s:
	update cmd_exe to load a PE exe file, and preserve critical registers.
COFF/PE: parse .idata

kernel/pe.s:
	print the contents of .idata.
gfx vmware svga2: paging fixes.

kernel/gfx.s:
	use kernel page directory (cr3) in gfx_txt_screen_update.

kernel/vmware/svga2.s:
	don't enter/exit gfx mode on boot (disable video startup check).
	cmd_gfx: make it work from non-CPL0.
bootloader: load kernel page aligned.

bootloader/sector1.s:
	add flag (enabled by default) to load kernel at page boundary.
	This makes debugging easier (qemu logs), and allows the kernel
	to map pages of itself in user space, or not.
more: don't sti.

kernel/debug.s:
	don't sti on more as this causes #GP for non-CPL0 tasks.
keyboard: don't schedule task by default

kernel/keyboard.s:
	add flag (disabled) to schedule a task on keypress.
	This is mainly used for stresstesting the scheduler.
paging: swap out cr3 for identity mapping.

kernel/paging.s:
	paging_idmap_page_f: switch out cr3 for kernel space, since idmapping is now
	only called from paging_alloc_page_idmap, which needs the page idmapped in
	kernel space. also add invlpg (not needed with cr3 swap).

	paging_print_$: the print PTE code (for structure at least) takes edx as the 4mb
	index, so it can print the target memory range for the PTE (by using it's location
	in the PD).
	paging_print_pt_struct$: print PTE target memrange.
exception handler: minor improvements.

kernel/idt.s:
	exception handler:
		print page fault linear address more brightly.
		'decompiler': stay within page when looking back.
		printing PDE/PTE: use kernel CR3 to read PTE.
		add disabled copy-paste to print the PTE/PDE from kernel space.
shell: minor fixes.

kernel/shell.s:
	cmd_ramdisk: update ds with proper CPL flat selector.

	cmd_paging: expect pid argument to be hex (as do the other task
	related commands).
Support running simple PE32/COFF binary.

	Summary:

		Complete implementation of loading a simple PE/COFF,
		using 'demand paging'. Use elf find_symbol to resolve
		symbols. Run the _main, bypassing the console startup
		code.

		Tested with a 'printf("Hello World!\n")' compiled for
		cygwin.

		Scheduler: allow to schedule tasks using flat segment
		selectors; allow to start a task suspended; preserve cr3.

kernel/elf.s:
	document shared header type and flags.
	allocate page table.
	use scheduler to start task.
	old:run cpl 2.

	elf_sh_print/elf_ph_print: print more compact.

	elf_ph_process: nop; using paging.
	elf_ph_move: (called by _process): add debug,

		XXX change copy count (-eax instead of -edx).

	elf_import:
		update .idata documentation.
		change debug.
		extract elf_idata_process_lib$ and process all libs.

	add elf_idata_print_idt.
	add elf_get_section$.

	find_symbol: always use prefix (not just for libc).

kernel/libc.s:
	add DEFSTUB macro.

	add setregs$, restoreregs$, switching between flat and non-zero-based
	selector mode.

	libc methods called by flat-memspace tasks will need cs modified
	otherwise the code offsets won't line up. the addresses resolved
	by the linker are adjusted to the tasks's memory layout, so they
	may be reached from incompatible CS.

	_c_main and _c_puts updated to be callable from flat space.

	define some cygwin1.dll and kernel32.dll stubs.

kernel/pe.s:
	implement paging (file contents copied, due to file alignment != mem
	alignment).

	major updates.

	implement library symbol resolution and linking.

kernel/gdt.s:
	add (GDT|SEL)_ring[0123][CD]Sf (add flat selectors), for now used for
	PE loading.

kernel/schedule.s:
	add task_cur_cr3 to preserve/restore the current value of cr3. Up to
	now, the initial cr3 was always set on scheduling, causing undesired
	results if cr3 was changed, such as in paging code.

	task_done: update to support being called from flat memory space.

	task_exit: don't return.

	task_queue_newentry: mark the task as suspended so it won't run before
	it's completely set up.

	schedule_task:
	  remove 'just in case' ds/es setup.

	  add TASK_FLAG_FLATSEG, which uses the ringXXSf (flat) instead of
	  ringXXS selectors.

	  add TASK_FLAG_SUSPENDED support, to schedule a suspended task.
	  (fg -p <pid> to start it).

	  when copying the flags, again make sure to set the suspended flag.

	  extract task_setup_stack$.

	  task_setup_stack$: correct task_done offset for flat offset if
	  TASK_FLAG_FLATSEG.

	task_setup_paging: also initialize task_cur_cr3.

	add task_map_pde: maps the given page in the PD as a PT (i.e. updates
	a PDE).