tests: move stuff into the test classes

We might want to consider eliminating jsonpickle._samples (again)
if we can move everything inline instead.

Signed-off-by: David Aguilar <davvid@gmail.com>
pickler: add support for iterable __slots__

An interesting edge case in Python is:

    class ObjectWithIterableSlots(object):
         __slots__ = iter('a')
         def __init__(self, a):
             self.a = a

    print(jsonpickle.encode(ObjectWithIterableSlots('a')))

The reason this is tricky is because __slots__ is an iterator
object and is consumed the first time it is used.  The initial
consumer may be python itself when building the class object.

There's no way to reset an iterator in Python but we can at
least use dir() to find attribute names when the __slots__
iterator has already been consumed.

Fallback to using dir() if we don't find any attributes when
iterating over __slots__.

Closes #67

Reported-by: Jason R. Coombs <jaraco@jaraco.com>
Helped-by: Marcin Tustin <marcin.tustin@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>