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.
@kevinushey can you see any obvious reason why this would crash? Are we missing a `PROTECT()`? (I don't think we are because we're not creating any new objects).

What we're doing is fundamentally a hack, but it seems like the simplest way to implement mocking, since we don't need to find every reference to a function at the R level.