Features, refactoring, and fixes

This adds memcached support, allows for local configuration files and logs to be stored elsewhere than the default, cleans up the organization of the tests folder, replaces the last uses of the old-style MySQL and PostgreSQL extensions with PDO, adds Vagrant and Ansible provisioning, and updates some of the dependencies. There is some method to the madness as I'm trying to bump us to versions of the libraries than would allow us the option of using Composer in future.