Revert "performance fix"

This reverts commit 774b9f278a57021a7e7451af086bcc7656882c2e.

The commit introduces a regression that causes the following exception
related to foreign key fields:

Traceback (most recent call last):
  File "...", line 966, in main
    class.method()
  File "...", line 203, in method
    self._method(argument)
  File "...", line 128, in _method
    object.save(using='connection')
  File ".../django/db/models/base.py", line 460, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File ".../django/db/models/base.py", line 570, in save_base
    created=(not record_exists), raw=raw, using=using)
  File ".../django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File ".../fullhistory/fullhistory.py", line 175, in save_history_signal
    REGISTERED_MODELS[type(instance)].create_history(instance, created and 'C' or 'U')
  File ".../fullhistory/fullhistory.py", line 116, in create_history
    request=request)
  File ".../django/db/models/base.py", line 352, in __init__
    setattr(self, field.name, rel_obj)
  File ".../django/db/models/fields/related.py", line 340, in __set__
    (value, instance._state.db, value._state.db))
  File ".../django/db/models/base.py", line 370, in __repr__
    u = unicode(self)
TypeError: coercing to Unicode: need string or buffer, NoneType found

The performance issues that the commit attempts to address are fixed in
Django 1.4+.
Fix duplicate key error when records are deleted.

When records are deleted from the full history table, it is possible to
encounter duplicate key integrity errors.  This is due to the revision
number being calcuated based on the length of the queryset for existing
revisions.

The calculation has been changed to query the maximum revision number
for the object and content type and then add one.