Refactor: using boost::system::error_code instead std::error_code.

It'll easier integration with ASIO.