ARROW-16964: [C++] TSAN error in asof-join-node tests (#13639)
ARROW-16964: [C++] TSAN error in asof-join-node tests (#13639)

Converted `total_batches_` and `batches_processed_` to atomic variables since they are accessed simultaneously by the input received and process threads.  This was leading to a TSAN failure as described in the JIRA.

Authored-by: Weston Pace <0dd0706858a011bb30a3fd82b71cee4f9094c502@gmail.com>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
icexelloss/arrow,kou/arrow,wesm/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,apache/arrow,apache/arrow,kou/arrow,icexelloss/arrow,wesm/arrow,wesm/arrow,kou/arrow,apache/arrow,icexelloss/arrow,kou/arrow,apache/arrow,wesm/arrow,kou/arrow,wesm/arrow,apache/arrow,apache/arrow,kou/arrow,kou/arrow,icexelloss/arrow,icexelloss/arrow,apache/arrow,apache/arrow,icexelloss/arrow,icexelloss/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,kou/arrow,wesm/arrow,wesm/arrow,apache/arrow,apache/arrow,icexelloss/arrow,kou/arrow,icexelloss/arrow,wesm/arrow,apache/arrow,apache/arrow,apache/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,kou/arrow