Added support for passing an external ScheduledExecutorService in the constructor

This allows for reusing threads amongst reporters. Because there could
be potentially multiple threads in the ScheduledExecutorService, the
report() method needs to be synchronized so that we do not initiate
multiple report tasks at the same time.
Fixed compilation
Merge pull request #504 from aniketbhatnagar/master

Added support for passing an external ScheduledExecutorService