[IO] rework dprintf to take a debug level, defined in DEBUGLEVEL

printf at the moment just calls dprintf, but soon will become
a seperate I/O queue.
diff --git a/kernel/main.c b/kernel/main.c
index cfe39b2..7fa8d59 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -67,30 +67,30 @@
 	// do any super early target initialization
 	target_early_init();
 
-	dprintf("welcome to lk\n\n");
+	dprintf(INFO, "welcome to lk\n\n");
 	
 	// deal with any static constructors
-	dprintf("calling constructors\n");
+	dprintf(SPEW, "calling constructors\n");
 	call_constructors();
 
 	// bring up the kernel heap
-	dprintf("initializing heap\n");
+	dprintf(SPEW, "initializing heap\n");
 	heap_init();
 
 	// initialize the threading system
-	dprintf("initializing threads\n");
+	dprintf(SPEW, "initializing threads\n");
 	thread_init();
 
 	// initialize the dpc system
-	dprintf("initializing dpc\n");
+	dprintf(SPEW, "initializing dpc\n");
 	dpc_init();
 
 	// initialize kernel timers
-	dprintf("initializing timers\n");
+	dprintf(SPEW, "initializing timers\n");
 	timer_init();
 
 	// create a thread to complete system initialization
-	dprintf("creating bootstrap completion thread\n");
+	dprintf(SPEW, "creating bootstrap completion thread\n");
 	thread_resume(thread_create("bootstrap2", &bootstrap2, NULL, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE));
 
 	// enable interrupts
@@ -104,19 +104,19 @@
 
 static int bootstrap2(void *arg)
 {
-	dprintf("top of bootstrap2()\n");
+	dprintf(SPEW, "top of bootstrap2()\n");
 
 	arch_init();
 
 	// initialize the rest of the platform
-	dprintf("initializing rest of platform\n");
+	dprintf(SPEW, "initializing platform\n");
 	platform_init();
-
-	// initialize the rest of the target
-	dprintf("initializing rest of target\n");
+	
+	// initialize the target
+	dprintf(SPEW, "initializing target\n");
 	target_init();
 
-	dprintf("calling project_init()\n");
+	dprintf(SPEW, "calling sys_init()\n");
 	project_init();
 
 	return 0;
diff --git a/kernel/thread.c b/kernel/thread.c
index 6de7d6b..fc9d9ca 100644
--- a/kernel/thread.c
+++ b/kernel/thread.c
@@ -156,7 +156,7 @@
 {
 	thread_t *t = (thread_t *)thread;
 
-//	dprintf("thread_cleanup_dpc: thread %p (%s)\n", t, t->name);
+//	dprintf(SPEW, "thread_cleanup_dpc: thread %p (%s)\n", t, t->name);
 
 #if THREAD_CHECKS
 	ASSERT(t->state == THREAD_DEATH);
@@ -238,7 +238,7 @@
 #endif
 
 	int next_queue = HIGHEST_PRIORITY - __builtin_clz(run_queue_bitmap) - (32 - NUM_PRIORITIES);
-//	dprintf("bitmap 0x%x, next %d\n", run_queue_bitmap, next_queue);
+	//dprintf(SPEW, "bitmap 0x%x, next %d\n", run_queue_bitmap, next_queue);
 
 	newthread = list_remove_head_type(&run_queue[next_queue], thread_t, queue_node);
 
@@ -451,11 +451,11 @@
 
 void dump_thread(thread_t *t)
 {
-	dprintf("dump_thread: t %p (%s)\n", t, t->name);
-	dprintf("\tstate %d, priority %d, remaining quantum %d, critical section %d\n", t->state, t->priority, t->remaining_quantum, t->saved_critical_section_count);
-	dprintf("\tstack %p, stack_size %zd\n", t->stack, t->stack_size);
-	dprintf("\tentry %p, arg %p\n", t->entry, t->arg);
-	dprintf("\twait queue %p, wait queue ret %d\n", t->blocking_wait_queue, t->wait_queue_block_ret);
+	dprintf(INFO, "dump_thread: t %p (%s)\n", t, t->name);
+	dprintf(INFO, "\tstate %d, priority %d, remaining quantum %d, critical section %d\n", t->state, t->priority, t->remaining_quantum, t->saved_critical_section_count);
+	dprintf(INFO, "\tstack %p, stack_size %zd\n", t->stack, t->stack_size);
+	dprintf(INFO, "\tentry %p, arg %p\n", t->entry, t->arg);
+	dprintf(INFO, "\twait queue %p, wait queue ret %d\n", t->blocking_wait_queue, t->wait_queue_block_ret);
 }
 
 void dump_all_threads(void)