poll-loop: Simplify and speed up polling.

The simplification comes from dropping support for canceling a
poll_waiter, which was a feature that was never used.  The speedup
comes from avoiding a malloc() for every call to poll_fd_wait().
(I doubt that this significantly improves performance.)

This prepares for making the polling structures per-thread in
the next commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
poll-loop: Make poll loop data structures per-thread.

Signed-off-by: Ben Pfaff <blp@nicira.com>
system-stats: Move into separate thread.

Signed-off-by: Ben Pfaff <blp@nicira.com>
byteq: Make the queue size variable instead of fixed at BYTEQ_SIZE bytes.

Signed-off-by: Ben Pfaff <blp@nicira.com>
util: New macros ROUND_UP_POW2, ROUND_DOWN_POW2.

Signed-off-by: Ben Pfaff <blp@nicira.com>
async-append: New library to allow asynchronous appending to a log file.

This will be hooked into the vlog library in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vlog: Use async I/O.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vlog: Make VLOG_ONCE thread-safe.

Of course, the code it calls into isn't thread-safe itself yet.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vlog: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>