Fix deadlock between adding to queue and getting batch
Fix deadlock between adding to queue and getting batch

Do not block when trying to write a batch to the queue. This can cause
appends to lock forever if the only thing reading from the queue needs
the mutex to write. Instead, if batchQueue is full pop the sample that
was just added from the partial batch and return false. The code doing
the appending already handles retries with backoff.

Signed-off-by: Chris Marchbanks <0ad0b538c51a24737b83a297dff91636ee98d89e@gmail.com>

prometheus/prometheus,prometheus/prometheus,prometheus/prometheus,prometheus/prometheus,prometheus/prometheus