Implemented Code Patch 0.10000

Implemented Code Patch 0.10000

For a details description, please refer to updateLog0.10000.markdown.

General Notes
-------------
+ The 0x10c Devkit Code Safety plugin now alerts the deallocated memory
that previously belonged to the initrd has been corrupted. Ignore this.
+ There are some small general code clean-ups that need no specific note
taken of them in this update.
+ The newly implemented bootstrap simply prints to screen "test second
stage bootloader." but demonstrates working order of vfs and peloader
+ Renamed rsfsfmt.exe utility to darkOsRsfs.exe and in its place put a
new build of darkOsRsFs to reflect code fixes (refer to darkOsRsfs
section.)
+ Updated initrd_build.bat respectivley
+ Updated initrd filesystem to contain the new bootstrap and shell
library.

Threading
---------
+ The ThreadContext structue now has a new table called the
ThreadEnvironmentBlock. Read the documentation for details.
+ The ThreadEnvironmentBlock describes the thread's environment.
Currently, just a pointer to the executable image in memory that the
thread belongs to (if it belongs to an executable image.)
+ All executing threads in the DCPU kernel are now initiated with the Z
register pointing to the thread's appropriate ThreadContext structure.
+ All kernel routines now assume that the Z register points to the
thread's thread context structure when the function is entered.
+ Albeit the Z register is never corrupted by the kernel. Thus if you
have been following the cdecl calling convention, there should be no
conflicts with your code here.
+ threading_createThread now creates a thread in the same name of the
executable image of the thread which invokes the routine. If you wish to
create a thread in the name of another executable image, you must use
threading_createThreadEx. Please review your use of
threading_createThread.
+ Added new routine threading_createThreadEx

Executable Image Loader\Format
-----------------------
+ The executable image loader supports new routines, and dropped support
for the peLoader_createImage.
+ Image headers now have their names\imports described using singlebyte
null-terminated strings. Doing otherwise will result in kernel error.
+ There is a new routine peLoader_initImage, and functions exactly the
same as peLoader_createImage, only now it takes an additional argument
that is a pointer to a file descriptor describing where dependancies
should be searched for as a first priority. System directories are also
searched when looking for dependancies.
+ peLoader_loadImage Loads an executable image from the filesystem and
Initializes\Executes it
+ peLoader_findImageEx Extends on to peLoader_findImage, allowing one
the option of loading the image from the filesystem if it is not found
in memory.

+ The PELoader Module now supports searching of dependency libraries.

Virtual File System & RSFS Driver
-------------------
+ Implemented vfs_read and rsfs_read.
+ Improved documentation on file descriptors.
+ Fixed bug in rsfs_fOpen which caused the parent directory file
descriptor to be the source & destination descriptor.
+ Restored vfs_fGetRoot, out file descriptor arguments to the vfs module
no longer need to be initialized with the vfs_fInitFileDescriptor
routine
+ vfs_fInitFileDescriptor has been dropped, along with
rsfs_fInitFileDescriptor and the respective implementation in the DDSFSI
spec

String
-------
+ Renamed multibyte routines to singlebyte routines (since the routines
work with singlebyte and not multibyte). The effect of this shouldn't be
noticed, and is just minor code-cleanup to resolve possible confusions.

Bootcode\Kernel Header
----------------------------
+ Encoded the kernel modules name in the header to multibyte ascii
encoding. The wide-character ascii encoding was dropped in the name,
+ Updates export table such that it now reflects changes to exported
routines from the PeLoader module.
+ All exports starting at ordinal 10 have been changed due to the
addition of threading apis and peloader apis
+ Removed sandboxing code that should not have been commited (under the
label, test)
+ Bootcode's branched thread now looks inside of initrd to locate the
bootstrap, and loads it along with its dependencies.

TestProgram
--------------
+ Test program was removed from the codebase and has been replaced with
a new solution called bootstrap. The bootstrap solution describes the
second-stage bootloader on the initrd. TestProgram was only for
sandboxing purposes.

SHELL
---------
+ The shell library was updated to conform to the new PEImage spec
changes.

darkOsRsfs
----------
+ Fixed a bug that encoded the offset of files incorrectly. The offset
was in terms of bytes, according to the spec, it should be in terms of
words.

Jeremy Wildsmith