Many small changes for VS 2010 compatability

some changes to atomic in afio.cpp
VS 2010 lacks reserve fro std::unordered_map -- this should be addressed
my solution just ignores it, we should if possible allocate the space at
construction (if that is availible)

More misc changes
More improvements for VS 2010

Down to one error left

TODO:
1.Fix enum class conflict in afio.hpp