2to3: Apply `methodattrs` fixes.

Replaces old style `f.im_func` and `f.im_class` method attributes
with `f.__func__` and `f.__class__`. Closes #3070.