the query that deletes past submissions (over the ARCHIVE limit)
is currently running on all form submissions for all forms.
this PR introduces basic randomness so it runs only on 20% of the
submissions.
if the form has 1000 stored submissions that query is very heavy,
if the form has less than 1000 it is totally unnecessary (while
still being possibly heavy).
Prevents these kinds of errors:
```
ERROR in app: Exception on /redacted@email [POST]
Traceback (most recent call last):
File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/.heroku/python/lib/python2.7/site-packages/flask_cors/decorator.py", line 128, in wrapped_function
resp = make_response(f(*args, **kwargs))
File "/app/formspree/forms/helpers.py", line 35, in decorator
return f(*args, **kwargs)
File "/app/formspree/forms/views.py", line 59, in send
host, referrer = get_temp_hostname(received_data['_host_nonce'])
ValueError: too many values to unpack
```
https://papertrailapp.com/groups/3007404/events?focus=819220498843115549&q=program%3Aapp%2Fweb.2&selected=819220498843115549
Solves https://formspree.zendesk.com/agent/tickets/50, and,
although reCAPTCHA supposedly does his own magic to detect the
submitters preferred language, it makes sense, since the form
owner has chosen to show a localized version of the page, to
also force reCAPTCHA to be on that version.
in the previous two commits I introduced these changes
and now I'm removing them because they doesn't serve
any purpose, just introduce unnecessary complexity.
for forms created in the dashboard, we can easily and safely
ignore ending slashes while comparing the host to which they
are tied and the host that has actually submitted them.