[torch::deploy] Replace c10::optional with boost implementation (#74286)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74286
This diff replaces `c10::optional` with the implementation it's based on in https://github.com/akrzemi1/Optional
in order to help torch::deploy function without a dependency on `torch`
https://github.com/pytorch/pytorch/pull/74002
Test Plan: buck test //caffe2/torch/csrc/deploy:test_deploy
Reviewed By: d4l3k
Differential Revision: D34907002
fbshipit-source-id: 93a3386f43d1c426f23c6dab5f898ed63b547a5c
(cherry picked from commit 182d9f70459f761aaa80a03cc68dd6cb9c07bfae)