Replace SharedStateResult with std::optional
std::optional was not usable when our Future class was introduced, but it is now, so we can replace SharedStateResult with it, reducing custom code.
Note that Apple Clang has some incompatibilites with part of the optional interface, but it isn't used here.
Patch by: phosit
Comments by: vladislavbelov
Accepted by: wraitii
Differential Revision: https://code.wildfiregames.com/D4803