reimplement std::hash specialization
reimplement std::hash specialization

Summary:
Reimplement `std::hash` specialization so that it doesn't depend on the conversion from DeprecatedOptionalField to folly::Optional.

The code it copied here: https://fburl.com/diffusion/f6wll13d

This is used when people want to put thrift structure to hash table: https://fburl.com/diffusion/40cwnr48

#publish_when_ready

Reviewed By: yfeldblum

Differential Revision: D20440452

fbshipit-source-id: 1f7fd069ead8b4f6e50a2172d75ec0538a902467

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift