folly/ApplyTuple.h: fix const-correctness & other issues, simplify
Summary:The existing implementation of folly::applyTuple does not support
mutable callables (such as mutable lambdas and other functor objects
that only implement non-const operator()).
This commit adds a few more unit tests and changes the implementation
so that new and existing tests pass.
Reviewed By: yfeldblum
Differential Revision:
D2942622
fb-gh-sync-id:
82478f290e9fd2020358ff79ef0a6bcf8a43738c
shipit-source-id:
82478f290e9fd2020358ff79ef0a6bcf8a43738c