Create a docker-based build.

This helps make it easier to run this build by removing the necessity to
setup and run a local mongo server.
Merge pull request #26 from nubs/docker-build

Create a docker-based build.
Remove --dev from composer.

composer installs dev dependencies by default nowadays.
Remove *~ from .gitignore.

I've never seen us ignore these editor files before...
Switch to shields.io for the travis build badge.
Add packagist badges.
Specify the testsuite directory in phpunit.xml.

This allows phpunit to be run without having to specify the path to the
test suite.  This is a nicety for users and can help make this play well
if we hook it up to scrutinizer.
Set the working directory for the docker build.
Enable strict code coverage.
Use phpcs as a library.

Rather than executing phpcs via passthru, pull it in as a library.  This
enables more programmatic access to it.
Use phpunit as a library.

This enables more programmatic access to phpunit, especially when it
comes to code coverage.  By using the code coverage report object
directly we can remove the clover.xml generation and libxml dependency.
Merge pull request #27 from nubs/master

Update build scripts to use phpunit/phpcs as a library and more.
Use fig instead of dockerBuild.php.

dockerBuild.php was a hack I put together just to test out how
orchestrating the separate containers would be.  Turns out, this is a
problem that needs more than a simple hack to solve.  The root of the
issue comes down to the edge cases where the state of various containers
isn't being properly handled: it tries to run containers that already
exist in some cases and doesn't run ones that have been stopped in
others.

Rather than beefing dockerBuild.php out into a larger script to handle
all this (complicated!), I took a look around to see what is on offer:

* [fig](http://fig.sh) - nice and simple and built to solve this exact
  problem
* [kubernetes](https://github.com/GoogleCloudPlatform/kubernetes) -
  Potentially useful in a production environment, but a bit overkill for
  our problem.
* [fleet](https://github.com/coreos/fleet) - Very interesting, but the
  ties to systemd and etcd make it difficult to use in all environments.
* [ansible](http://docs.ansible.com/docker_module.html) - A nice
  chef-esque way of doing things, but requires a lot of extra
  configuration to manage and feels funny running against localhost.

All in all, I couldn't find much out there to really compete with fig
for this usecase although I'm sure some other small attempts exist.  fig
is a python-based command, but it is distributed as a linux binary, so
python doesn't really come into play.  It takes 30 seconds to setup and
has a very intuitive CLI (coming from Docker) with decent documentation
via `fig help <command>` and via its website.

Implementing the switch is fairly straightforward.  Take the primary
docker run line and extract the links and volumes into the fig.yml
configuration as given.  Create a "build" image that is the primary
build for the package.  Additional services can also be added (mongo,
redis, etc.) and because they are linked to the "build" image, they will
be started first before the build container is run.

The set-env.sh change is related to a small difference in how fig names
its containers compared to how dockerBuild.php does.  It takes a more
convention-driven approach that allows for multiple copies of a single
service and doesn't provide configuration for overriding its service
names (that I can tell).
Move the Dockerfile to tests.

In practice, docker only allows a single Dockerfile per directory.  This
makes the directory that the Dockerfile is in analogous to a namespace
for your container.  It's important to place these containers in the
correct location.  In this case, I believe that this Dockerfile belongs
in the tests namespace and that we should keep the root project
namespace open for something that potentially "executes" the project in
a more general sense.
Update documentation to better match our standard.
Merge pull request #28 from nubs/master

Use fig instead of dockerBuild.php.
Switch to use nubs/phpunit base docker image.

The nubs/phpunit image takes care of a lot of the environment
initialization in a more centralized location.
Use a relative path for the build script.

This makes it simpler to change the code location in the future.
Merge pull request #29 from nubs/master

Switch to use nubs/phpunit base docker image.
Run multiple mongo db versions and extensions in the travis build.

Removed a couple php versions to keep the number of runs down.