Use C++17 compiler if possible
Use C++17 compiler if possible

This allows using new features of C++17 conditionally.
Simplify also the code which checks and sets the C++ version.

Signed-off-by: Stefan Weil <8d4c780fcfdc41841e5070f4c43da8958ba6aec0@weilnetz.de>

UB-Mannheim/tesseract,stweil/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,stweil/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,amitdo/tesseract,stweil/tesseract,stweil/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,amitdo/tesseract,amitdo/tesseract,stweil/tesseract