patch to support kqueue

Conflicts:
	configure.ac
	src/proto/nc_memcache.c
abstract out the event interface

Conflicts:
	src/Makefile.am
add nc_epoll.c nc_kqueue.c and  remove nc_event.c
Fix grammar in configure.ac
Remove core_core declaration from nc_core.h
Use EV_SET instead of memset and manually setting fields.
Get rid of extraneous local variables.
Fix bug in nc_kqueue.

Because of the way kqueue works, the returned event list can contain multiple entries for one connection/fd (e.g. one kevent for EVFILT_READ and one kevent for EVFILT_WRITE). This can result in a segfault where you first process the EVFILT_READ, decide that the client is sending bad data and close the connection (and freeing resources). Subsequently when you return to process the next kevent (the EVFILT_WRITE), you attempt to use the (freed) conn object pointed to by udata which fails.

The way we fix this is to walk the list of kevents waiting to be processed and zeroing out events that belong to connections we're about to close.
Add #include for nc_event.h to nc_stats.c so that we have the function prototype for evbase_create.
Provide support for platforms without backtrace support (e.g. FreeBSD).
Produce an error message when ./configure is run if neither epoll or kqueue is supported, instead of producing confusing link errors because both nc_epoll.c and nc_kqueue.c are empty.
Fix typo in configure.ac
Fix typo in define of NC_HAVE_BACKTRACE
Reverting bad commits
Fix typo
Reverting more bad commits.
Last bad commit reverted
exit 1 if configuration file is invalid
usefull in reload/restart init script, when file is invalid, die with
errors.
Merge pull request #58 from Cofyc/checkconf

exit 1 if configuration file is invalid
make nc_test_conf return bool