Don't try and instantiate an invalid function in DiscriminatedPtrDetail
Summary:
THe issue is quite simple: Regardless of the control flow, the previous implementation of this was instantiating `ApplyVisitor1<V,R>` which declares a return type, but never returns.
This refactors `ApplyVisitor1` and `ApplyConstVisitor1` so that the part of the control flow that was previously never reached simply doesn't exist anymore.
Reviewed By: yfeldblum
Differential Revision:
D3479584
fbshipit-source-id:
605a48e39bba6dc14df1af1e76b55ea60f3e69d5