Monitor fixes and cleanup

- Remove unneeded 'count' parameter from moncreate()
- Simplify monitor table initialization, and correctly use MFREE rather
  than SFREE.
- Use BADTID for NOOWNER, not hard-coded -1
- Don't leak monitor table entry in moncreate() if semaphore cannot be
  allocated
- Clarify that monfree() does not handle freeing locked monitors.  The
  previous code claimed to allow this, but didn't actually because lock()
  threads woken up in such cases cannot reliably detect that the monitor
  has been freed.
- Improved documentation for all monitor functions.