Database Improvements

Ongoing work to replace all of TheyWorkForYou's raw queries with nice shiny PDO prepared statements.
Fixed at https://github.com/mysociety/theyworkforyou/blob/database-improvements/www/includes/easyparliament/alert.php#L438.

Tests for alerts were added in #362.