[common] switch to std::optional

Since the project has been using C++17-capable compiler to compile the
server-side code for a while, it's time to make next step to reduce
dependency on thirdparty components and start using std::optional
instead of boost::optional.  It's been discussed a few times with Grant
and others, so here is the patch.

NOTE: the current code uses std::optional::operator*() since the
      std::optional::value() method isn't available for some older
      compilers which aren't fully C++17 compliant (see [1] for details)

[1] https://github.com/apache/kudu/commit/3b984171bd4a249c4e848062d1e62d1e4c6a1b14

Change-Id: Iae320c3ed2487b896539fcbad4425c8480a4b349
Reviewed-on: http://gerrit.cloudera.org:8080/18638
Tested-by: Alexey Serbin <alexey@apache.org>
Reviewed-by: Attila Bukor <abukor@apache.org>
249 files changed