Added backwards compatibility with old unsalted SHA1 passwords

This is to fix ticket https://code.djangoproject.com/ticket/18144 for password stored in SHA1. It was already fixed for MD5.