Can now download VCFs, major code cleaning as well

Roughly, this PR uses SQLAlchemy to generate SQL, instead of string concatenating. This fixes SQL injection issues, as well as cleans up gross code. There is some scaffolding around this that gets used in e.g. views.py. 

I also introduce the common top-level module to store functions and functionality common to workers and cycledash modules.

fixes #350 
fixes #62
fixes #246