Fix nasty, subtle bug in readSignal

The OR 1 instruction at the end to reset the zero flag was
destroying the contents of register A, which are not supposed to be
modified by the routine.
Clear unclaimed semaphores/signals when a thread is killed

This commit closes #4.
Rename readSignalGivenThread to readSignalAsThread and add explanation
Merge pull request #14 from KnightSoft/semaphores

Semaphores