Implemented partial mocking/spying.

Here's the pull request I promised you. I quickly checked the issue tracker and it seems like issue #6 and #38 are requesting this feature.

It should be safe to merge this pull request as it doesn't break any current functionality (assuming that all functionality is covered by tests). This feature is fully functional, but since it's only the first version I'm sure there's room for improvement. Any feedback is welcome.

Instead of repeating myself I recommend that you read the commit message of 401c001.