Revert "Upgrade to 2.1.8-stable (2017-01-22)." and "Probably Mac build fix?"

This reverts commits 2a572d125a91a4aafd3ad8ce87259fc640fa0763 and
af241a5c8c2cde0fab7d7d563276c1095b00e3b4, which break tombstoned.

Bug: http://b/64543673
Test: manual + treehugger
diff --git a/event_iocp.c b/event_iocp.c
index a9902fb..9648366 100644
--- a/event_iocp.c
+++ b/event_iocp.c
@@ -23,7 +23,6 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include "evconfig-private.h"
 
 #ifndef _WIN32_WINNT
 /* Minimum required for InitializeCriticalSectionAndSpinCount */
@@ -46,7 +45,7 @@
 #define NOTIFICATION_KEY ((ULONG_PTR)-1)
 
 void
-event_overlapped_init_(struct event_overlapped *o, iocp_callback cb)
+event_overlapped_init(struct event_overlapped *o, iocp_callback cb)
 {
 	memset(o, 0, sizeof(struct event_overlapped));
 	o->cb = cb;
@@ -61,9 +60,9 @@
 }
 
 static void
-loop(void *port_)
+loop(void *_port)
 {
-	struct event_iocp_port *port = port_;
+	struct event_iocp_port *port = _port;
 	long ms = port->ms;
 	HANDLE p = port->port;
 
@@ -99,7 +98,7 @@
 }
 
 int
-event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd,
+event_iocp_port_associate(struct event_iocp_port *port, evutil_socket_t fd,
     ev_uintptr_t key)
 {
 	HANDLE h;
@@ -165,7 +164,7 @@
 static struct win32_extension_fns the_extension_fns;
 
 const struct win32_extension_fns *
-event_get_win32_extension_fns_(void)
+event_get_win32_extension_fns(void)
 {
 	return &the_extension_fns;
 }
@@ -173,7 +172,7 @@
 #define N_CPUS_DEFAULT 2
 
 struct event_iocp_port *
-event_iocp_port_launch_(int n_cpus)
+event_iocp_port_launch(int n_cpus)
 {
 	struct event_iocp_port *port;
 	int i;
@@ -224,7 +223,7 @@
 }
 
 static void
-event_iocp_port_unlock_and_free_(struct event_iocp_port *port)
+_event_iocp_port_unlock_and_free(struct event_iocp_port *port)
 {
 	DeleteCriticalSection(&port->lock);
 	CloseHandle(port->port);
@@ -247,7 +246,7 @@
 }
 
 int
-event_iocp_shutdown_(struct event_iocp_port *port, long waitMsec)
+event_iocp_shutdown(struct event_iocp_port *port, long waitMsec)
 {
 	DWORD ms = INFINITE;
 	int n;
@@ -265,7 +264,7 @@
 	n = port->n_live_threads;
 	LeaveCriticalSection(&port->lock);
 	if (n == 0) {
-		event_iocp_port_unlock_and_free_(port);
+		_event_iocp_port_unlock_and_free(port);
 		return 0;
 	} else {
 		return -1;
@@ -273,7 +272,7 @@
 }
 
 int
-event_iocp_activate_overlapped_(
+event_iocp_activate_overlapped(
     struct event_iocp_port *port, struct event_overlapped *o,
     ev_uintptr_t key, ev_uint32_t n)
 {
@@ -284,9 +283,9 @@
 }
 
 struct event_iocp_port *
-event_base_get_iocp_(struct event_base *base)
+event_base_get_iocp(struct event_base *base)
 {
-#ifdef _WIN32
+#ifdef WIN32
 	return base->iocp;
 #else
 	return NULL;