move check_request out to its own function, so folks can import it.
move check_request out to its own function, so folks can import it.

check_request takes a request and a boolean, is_unsuccessful.

It updates the database as needed, then returns True if the response
should continue unchanged, and False if it should be blocked.

it also logs out the request if we're blocking.

jazzband/django-axes,grue/django-axes,SteveByerly/django-axes,svenhertle/django-axes,zoten/django-axes,django-pci/django-axes,nidhi-delhivery/django-axes,SteveByerly/django-axes