continued bug fixing and work on core features

General bug fixing and feature work. Flushed out the threading conditions and
read-write locks for use by third-parties. Added I/O reader/writer objects for
structured input and output.

 - Modified threading primitives to use inlined structures, allowing for
   compile-time initialization.

 - Fixed backtrace crash bug.

 - Properly include platform-specific headers.

 - Handle POSIX signals to generate backtraces in debug mode.

 - Implemented additional base memory and math functions.

 - Fix handling of negative numbers in printf.

 - Added handling of control signals on I/O output.