Use __typeof__ or decltype() + memfn() to determine result of method call.

Using result_of<MemberFuncPtrType()> worked with std::tr1::result_of<>
in GCC and Clang but not with the C++11 version.

All the currently supported compilers (VS 2010, GCC, clang) support
either decltype() or __typeof__ so we'll use that instead.