Add flush method to TreasureDataLogger. fixes #11