cleaned up legacy/testing log code
more compact log format using varint encoding
Win32 fixes to logging (stresstest still fails); updated log test
use binary mode for Windows file I/O
Merge branch 'logtest'