Fix order of struct members. Show thread number in debugging output.
Fixed debugging mode.
Fixed bug where "prev" member of second node in region may not be set correctly.
Changed thread priorities. Added additional debugging checks. Experimentally changed use of sch_get_id.