Modify code style of startThread routine

Mainly, I indented based on stack usage.
Replace hardcoded thread max value mask with symbolic constant
Correct the potential reassigning of thread IDs

It basically stores the *last* assigned ID instead of the next one,
and looks for a free ID right as it needs to assign it.

This fixes issue #2.
Merge branch 'issue2'

Conflicts:
	src/00/boot.asm