avoid exceptions by moving http requests to bg thread
fix bug causing events hapenning in the same second to be smashed together as a result of timestamp imprecision
move post-flush logic to bg thread to retain parity with earlier version
refactor logging function for readability
readme fix
regenerate docs