Clean up

* Add fallback for http_response_code
  Need to support PHP 5.3 for wmflabs.org
* Account for `new PDO` throwing an exception (e.g. when
  the database doesn't exist or couldn't be opened).
* Remove inline error reporting setting.
* Fix missing-query detection.