Major restructuring of the code

* The event loop now has a context variable that keeps track
  of variables. This removes potentially troublesome static
  variables.
* Configuration is now done via json using the yajl library.
  The bot now takes a parameter from the command line for
  the configuration. This also removes the need for config.h
  that statically configures the bot.
* Pool allocator used for dynamic allocation.