tests: eliminate jsonpickle._samples

Move classes inline so that everything is self-contained.
Update docstrings to reflect the move.

Signed-off-by: David Aguilar <davvid@gmail.com>
handlers: rename obj to data for clarity
jsonpickle: add support for compiled regexes

Add a custom handler for objects returned by re.compile().

Register and lookup custom handlers by their class identifiers
rather than the actual class object itself.

This is needed because the _sre.SRE_Pattern class is not
importable in all versions of Python.  Looking it up by
name must be done instead.

Signed-off-by: David Aguilar <davvid@gmail.com>
Merge branch 'master' of https://github.com/jsonpickle/jsonpickle
Add support for __reduce__ to redirect to another object
Add string-based reduce redirection for __reduce_ex__
Implement full __reduce__ and __reduce_ex__ functionality. As part of that, adds support for pickling of iterators.