track number of lines for stats
fix theoretical concurrency issue in engines list
use multiple reader/single writer lock also for sockets access, should be a very tiny speed improvement