replace hacky bare socket handling with proper boost::asio socket handling. Introduces dependency on boost::asio 1.46