GH-36770: [C++] Use custom endpoint for s3 using environment variable AWS_ENDPOINT_URL (#36791)
### Rationale for this change
we need a way to read custom object storage (such as minio host or other s3-like storage).
use environment variable `AWS_ENDPOINT_URL `
### What changes are included in this PR?
set variable endpoint_override according the environment variable
### Are these changes tested?
unittest and tested on pyarrow
### Are there any user-facing changes?
No
* Closes: #36770
Authored-by: yiwei.wang <yiwei.wang@weride.ai>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>