const value() needs to return a value if exception is thrown

The const version of `std::optional::value()` doesn't currently return a value if an exception is thrown, which causes compiler errors (at least in gcc 4.8).  This commit fixes it to return a dummy value after the exception is thrown, just like the non-const version currently does.