This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
This allows for sharing the implementation of key components across multiple MLIR language servers. These will be used in a followup to help implement a PDLL language server. Differential Revision: https://reviews.llvm.org/D121540