Use lowercase table names

For some reason, SQLAlchemy makes them lowercase anyway.
Remove sha1 column

We're not using it.
Make scraper pass PEP-8 linter
Move method
Add index for pageid column

Makes sense now that it's used for selecting images.