Can now connect to Heroku database

Changed database setup code to read from a DATABASE_URL enviornment
variable for proper setup on Heroku.
Rewrote haversine function

Rewrote haversine function in SQL because Heroku doesn't support
PL/Python.