[py3k] use six.with_metaclass() for python3 compatibility
[py3k] make RandomNumberGenerator work if given a unicode string
simplified a list comprehension
[py3k] further python3 compatibility