Added tests for the promise module.
More .h to .hpp
Made event loop a template parameter.