unix: abstract away async pipe infrastructure

This commit lays the groundwork for the switch to eventfds on Linux.
linux: use eventfds for async handles

Use eventfds to drive async handles, fall back to regular pipes on older
kernels (pre-2.6.22).

Gives a nice boost on the async handle benchmarks. Before:

  12,516,113 async events in 5.0 seconds (2,503,222/s, 1,048,576 unique
  async1: 11.95 sec (83,701/sec)
  async2: 11.65 sec (85,862/sec)
  async4: 5.20 sec (192,154/sec)
  async8: 9.97 sec (100,315/sec)
  async_pummel_1: 1,000,000 callbacks in 2.56 seconds (389,919/sec)
  async_pummel_2: 1,000,000 callbacks in 2.65 seconds (377,205/sec)
  async_pummel_4: 1,000,000 callbacks in 2.18 seconds (457,704/sec)
  async_pummel_8: 1,000,000 callbacks in 4.19 seconds (238,632/sec)

After:

  16,168,081 async events in 5.0 seconds (3,233,616/s, 1,048,576 unique
  async1: 11.08 sec (90,213/sec)
  async2: 10.17 sec (98,297/sec)
  async4: 4.81 sec (207,789/sec)
  async8: 8.98 sec (111,419/sec)
  async_pummel_1: 1,000,000 callbacks in 1.16 seconds (863,296/sec)
  async_pummel_2: 1,000,000 callbacks in 1.45 seconds (691,459/sec)
  async_pummel_4: 1,000,000 callbacks in 0.66 seconds (1,514,770/sec)
  async_pummel_8: 1,000,000 callbacks in 1.42 seconds (704,549/sec)

That's a speedup from anywhere between 10% to 330%.