Changed some doctests to work in 3.1 and 3.3 versions.
Move identity.core doctests to unit tests
Moving one doctest from identity.cache to unit tests to pass in 3.3
Compatibility to work with simplejson as json module
Importing with_statement from future and
making exceptions compatible with a compat.get_exception() function
Python 2.5 does not have class decorators
Fixing import
Python 2.5 does not have @prop.setter decorator
Change notify_all() to notifyAll() to work with Python 2.5
Add some imports to make it compatible with Python 2.5
Remove socket.create_connection to support Python 2.5
Add format and bytes to compat module
Cast tuple to list only in python 2.5
unittest2py3k don't discover tests running with builtin unittest