Various improvements and fixes.

 - per user directory for log files.
 - potential race in base.MakeDirs().
 - include timezone in logs.
 - memoize and synchronized decorators.
 - float and boolean flag types.