Refactor and tests (#14) (#15)
* Added tests, start refactor work on signals
* Update get_request_info function to work with dict objects, which
would allow changing and inserting various fields easier
* Added a message formatter that will take our siem_data (created by
updated function above) and format it as a valid json string, while
stripping the open and closing brackets.
* Updated the signals handlers so that they use our new methods (defined
above)
* Added tests for all the above
* variable name update
* Tests and refactor for middlewares
* Rename middlewares.py -> middleware.py
* Since name changed, needs updated here also
* Prevent error when user refresh logout page
* Add optional django-ipware integration
Co-authored-by: Andre Engelbrecht <andre@tehnode.co.uk>