Make inclusion of header <optional> opt-out via macro (#7168)
Make inclusion of header <optional> opt-out via macro (#7168)

* Allow suppression of including <optional> via macro

* Combine preprocessor conditions

* Make inclusion of header <optional> opt-in

* Make inclusion of <optional> opt-out via macro

* Auto-detect C++17+ when defining macro

* Enclose macro expression in parentheses

* Check value of macro, not whether it's defined

* Fix parentheses

* Don't define macro with expression using other macros

The preprocessor doesn't seem to like it.

* Fix parentheses
alexames/flatbuffers,alexames/flatbuffers,alexames/flatbuffers,alexames/flatbuffers,google/flatbuffers,google/flatbuffers,google/flatbuffers,google/flatbuffers,alexames/flatbuffers,google/flatbuffers,google/flatbuffers,google/flatbuffers,google/flatbuffers,alexames/flatbuffers,alexames/flatbuffers,alexames/flatbuffers,google/flatbuffers,alexames/flatbuffers,alexames/flatbuffers,google/flatbuffers,google/flatbuffers,google/flatbuffers,alexames/flatbuffers,alexames/flatbuffers,google/flatbuffers,alexames/flatbuffers,alexames/flatbuffers,google/flatbuffers,alexames/flatbuffers,google/flatbuffers