In-place mocking

Temporarily overwrite the memory that stores all information about a function to be mocked (formals, body, environment, attributes). Now, also mocking imported functions works as expected.

Fixes #171.

Doesn't include #175 anymore.
It's not clear that `identical()` is the right test to be using, and in fact, it's a bit surprising the tests pass. The functions aren't identical (because they don't point to the same location in memory) but they are equal. (But I'm pretty sure `all.equal()` won't do the right thing either)