Patch to work with newest libevent

[PATCH] Added patch to work with libevent2, which also required some modifications on HipHop code

This patch adds the HipHop needed functions to the latest version of libevent2. Also, some minimum changes where needed on HipHop code.

The patch agains libevent need to be revised, because some portions of the code don't make sense to me and I just don't apply them assuming their function was to fix bugs on libevent1.4

That being said, I've been using HipHop with this patch for some time and all seems to work OK.