Initial count of 0 now allowed in semaphores

Various fixes to testing a semaphore as a simple lock

Added new test; "diners" example for use of semaphore