Windows fixes.

Reorder member variables so boost::asio objects are properly destroyed.
Clean up integer conversion warnings.
Replace std::chrono with boost::chrono because Windows implementation is
buggy.
Define WIN32_WINNT to be Windows 7