Javascript client logging module which queues up requests and logs them to the server in batches