Fixes <<__Memoize>> causing fatals when applied to static functions on traits

Summary: Normally the static $impl function is called by name on statics, but with traits that resolves to calling a private static method on another class. The fix is in this scenario to call self::foo$impl(); There's precident for this in EmitterVisitor::emitFuncCall().

Reviewed By: @jano

Differential Revision: D1576279
Prevents collisions between strings and objects as cache keys

Summary: With DY, if an object can have the same cache key as a string. This behavior was replicated in <<__Memoize>>. While that probably never happens in practice, this makes it correct by disambiguating strings and objects.

Reviewed By: @jano

Differential Revision: D1575956