Code structure for related fields and their tests
Add tests for FK related fields
Related field can reveive objects, not only PKs

So we can do things like this:
    somegroup.members.sadd(someuser)
instead of
    somegroup.members.sadd(someuser._pk)
Enhance the field copy system.

Many times, RedisField objects are copied, using the copy module.
The way the __copy__ method did things was to create a new object,
and copy other attributes.
In a subclass, to copy new attributes, it was as easy as to define a new
__copy__ method, call super, and do more stuff.
But there was a big problem with the call to the constructor: we passed
the whole self.__dict__ dict, whatever the real signature was. First, we
pass some not attended arguments, and second, this didn't work if the
signature is different.
So all the __copy__ method is now rewritten to call the constructor, and
copy attributes, all using a _copy_conf attribute on the class.
This _copy_conf attribute is a dict with 3 entries:
    - args: list of attributes names to pass as *args to the constructor
    - kwargs: list of attributes names to pass as **kwargs to the
              constructor. If a tuple is used instead of a simple string
              in the list, its first entry will be the kwarg name, and
              the second the name of the attribute to copy
    - attrs: list of attributes names to copy (with "=") from the old
             object to the new one

The main goal of this internal change, is to allow subfield with different
signatures than RedisField
Merge branch 'field-copy' into related_fields
Add methods to attach a field to a model/instance

The previous way to say that a field was attached to a model or later to
an instance was to do:
    field._model = model
or
    field._instance = instance

But in RedisField subclasses it would be great to be able to catch this to
do some stuff. With this commit, it's as easy as to override the new
_attach_to_model and _attach_to_instance methods, which actually simply
do the assignments as before.
Merge branch 'master' into related_fields
Merge branch 'ordered_fields' into related_fields
Merge branch 'master' into related_fields
"abstract" is now set before creating the fields

In the RedisModel metaclass, we now set the "abstract" attribute on the
newly created class before creating the fields, to let them know if
the model on which they are attached is abstract or not
Add relations between related fields and models.

All RelatedField now attend a "to" parameter to define which model is
related, and a "related_name" (optional) to define the name of the
reverse relation.

Example:

    class Person(RelatedField):
        name = HashableField()
        group = FKHashableField('Group', related_name='members')

    class Group(RelatedField):
        name = HashableField()

    group = Group(name='my group')
    person = Person(name='me', group=group)

    members = Person.collection(group=group._pk)
    # or
    members = group.members()

The "to" parameter can be:
  - a model
  - the string "self" to design the current model
  - the name of a model (implies the namespace of the current model)
  - the full name ('namespace:name') of a model

The "related_name" parameter can be:
  - not defined, and it will be: "%s_set" % current_field.name
  - a string, which must be a valid python identifier
  - a formatable string, with %(namespace)s and/or %(model)s which will
    be replaced by the namespace and model of the current model (usefull
    for an abstract model)

The related_name si used to create a shortcut to a collection, as shown
with "members =" lines above. You can pass additional filters, as for a
real collection (in fact it is/returns a real collection)
Merge branch 'respect-fields-order-when-creating' into related_fields
Add tests for RelatedCollection
Merge branch 'soft-work-on-main-metaclass' into related_fields
Change way of handling objects passed as values

The previous way consisted in updating the _traverse_command method, but
now we create real methods, via a metaclass, which can call the super
ones, to respect the order of actions.
Make deletion follow related fields.

If we delete a object linked to a related field, we remove all
references to the former in all instances of the latter.
Add/correct commands that can take object as value
Add missing tests in contrib/related
Remove the sys.path hack in tests

The contrib/related tests must be run via the test runner
Merge branch 'master' into related_fields