lib/logger.rb: Inter-process locking for log rotation

* lib/logger.rb: Inter-process locking for log rotation
* test/logger/test_logger.rb: ditto.