Implemented a metaclass-based technique for self-registering handlers

--HG--
extra : rebase_source : d301524fd9a0d799ea0344508e675ea9c93f170f
setup.py: update copyright and metadata

Signed-off-by: David Aguilar <davvid@gmail.com>
setup.py: move version information to version.py

Centralize version information into a jsonpickle/version.py
file.  Avoid sandbox violations by reading and executing the
file directly instead of importing it, which avoids pulling in
jsonpickle/__init__.py.

This is suggestion number 1 from @jaraco -- store the version
in a version.py file.

C.f. https://github.com/jsonpickle/jsonpickle/issues/20

Closes #20

Helped-by: Jason R. Coombs <jaraco@jaraco.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Added tests for custom handlers
Use self-registering handlers for Datetime objects
Merge pull request #39 from jaraco/handler-tests

Added tests for custom handlers
Merge pull request #41 from jaraco/self-registering-handlers

Self registering handlers
pickler: remove unused import

Signed-off-by: David Aguilar <davvid@gmail.com>
util: avoid calling repr() in is_type()

repr() can be an expensive operation, and can be tickled into an
infinite loop when external code uses jsonpickle in its repr()
implementation.

Avoid the problem entirely by checking the type against types.ClassType,
which is simpler and more robust.

Closes #23

Reported-by: Todd Kennedy (@toddself) <todd.kennedy@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Rakefile: eliminate redundant VERSION file

Read the version from jsonpickle/version.py.

Signed-off-by: David Aguilar <davvid@gmail.com>