ported bugfix for consistent reads to all supported platforms
refactored TVAR to simplify the code and incrementally take advantage of available features: compare-and-swap, memory-barriers, bordeaux-threads lock owner...