Implement an Identity Map

We realized that we definitely need an [Identity Map](http://martinfowler.com/eaaCatalog/identityMap.html). Not doing this would just lead to all kinds of trouble :wink:

Since we're aiming for Rails integration we need to make sure the map is reset for each request. In an ideal world this would happen somewhere in Rack to make it usable for other Rack-based frameworks.