Enabling travis CI. Few minor code changes.

Adding the .travis.yml file for CI. Making static a variable in the
header file to prevent re-definition errors. Defining explicitly the
constructor of mock classes. Adding the -pthread compiler flag to gcc.