Add support for "bound methods".

I.e. getting an attribute that is a function will wrap that function
in another function thaat makes sure, that calling the inner function
will pass the correct value for the implicit this.