Fix edge case for Snapshot #auto_accept and #diff

While working on something in dev, I was able to get my Snapshot data in
a way that was confusing and difficult to work with. Essentially, I had
a snapshot that had its diff set against itself, so it was always
auto-accepting.

To prevent this, I originally wanted to add a custom validation that
would prevent diffed_with_snapshot from being the same as snapshot.
However, that caused problems that I don't feel like jumping into right
now, so I am tackling this from a different angle for now by making
`#auto_accept` and `#diff` smarter.

While I was at it, I added specs for Snapshot#diff? and corrected the
description on an `it` block that was saying the opposite of what it was
doing.

Change-Id: I4c9c34989c67f8d51b44573d9cf05cf99505bbf3
Split up SnapshotWorker

This worker was responsible for too much work. To help it match how our
services are layed out, improve the possibility for parallelization, and
potentially reduce the amount of work that needs to be re-done in the
event of an error somewhere in the work, I am splitting up
SnapshotWorker into SnapshotterWorker and SnapshotComparerWorker.

I decided to continue with the after_commit trigger for spawning the
SnapshotComparerWorker so that the SnapshotterWorker doesn't need any
knowledge of any other workers. Since we will never have anything to
compare when the Snapshot is first created, I stuck with on update only.

This change highlights the difference between how we are handling these
two different types of work: SnapshotterWorker delegates all of the work
to the service object, which has to know how to update the snapshot
instance instance, whereas SnapshotComparerWorker is responsible for
updating the instance. I believe that this happened because we were
considering trying out different diff tools (see #8), so we architected
the SnapshotComparer in a way that was more modular; however, we had not
considered trying out different snapshotting tools, so we did not
architect the Snapshotter in a similarly modular way. I think I prefer
the architecture of SnapshotComparerWorker because of its flexibility,
so I will probably update Snapshotter and SnapshotterWorker to be
in a similar style.

Change-Id: I3abe5adc4f6de9811388e3b0e50524db22499aad
Break up Snapshot#accept!

It felt a little weird to have two method calls in a row that both end
up saving the instance. To resolve this, I split up Snapshot#accept!
into Snapshot#accept, which simply modifies the properties, and
Snapshot#accept!, which calls #accept followed by #save!.

I had considered doing this with a conditional in the worker, but this
seemed more readable to me.

Change-Id: I604bc0c95e92eec2dc2236c38491b76bf8162852
Add some files necessary to run on Heroku

Since Heroku recommends Unicorn, add config file for that.
Since DiffUX depends on redis, add an initializer to configure sidekiq
in that environment.
Since Heroku needs a Procfile to know what to do, add one.
Add rails_12factor gem in production

Heroku requires this gem, because the app must serve its own assets (and
this is disabled by default in Rails 4). It also improves logging
capabilities on Heroku.
Add heroku-multi-buildpack file for phantomjs

Since Heroku is a Read Only filesystem you need to download all the
stuff you'll need at slug compilation time. So the lazy phantomjs
downloading of the tarball won't work.

Fortunately, someone has done the work of making a package that we can
use to fetch phantomjs and include it at compile time. A subsequent
commit will configure the phantomjs gem to use it at the correct path.
Add PhantomJS shim to run on Heroku

I wish there were a way to provide a simple path to a PhantomJS
executable. But it requires a bit of implementation detail as the
PhantomJS gem selects the first usable platform.

None of the default platforms will be usable on Heroku (because of the
read-only filesystem), so this creates a new platform that points to the
correct executable, which has already been installed.
Apparently English is an evolving language

And misspellings like this are okay now.

http://english.stackexchange.com/a/69710
Fix Phantomjs platform methods to be on Eigenclass
Add "Start new sweep" button to sweeps#index page

This button was already on the projects#show page, but it makes sense
for it to be here as well.
Update paperclip gem 4.0.0 -> 4.1.0

Changes:

  - Improvement: Add :content_type_mappings to correct for missing spoof
    types
  - Improvement: Credit Egor Homakov with discovering the content_type
    spoof bug
  - Improvement: Memoize calls to identify in the thumbnail processor
  - Improvement: Make MIME type optional for Data URIs.
  - Improvement: Add default format for styles

Change-Id: Ia7b6239c48401b94f6dd887f1e032dcf4f4c0d76
Update term-ansicolor 1.2.2 -> 1.3.0, tins 0.13.2 -> 1.0

These are dependencies of the coveralls gem. Just bumping them to keep
things up to date.

Change-Id: Iab1b6e91169933f2f297f2fbb9dfe216c7983041
Remove empty JS and stylesheet files

The urls.css.scss and static_pages.js.coffee files were just shells of
files that were automatically generated. Since we aren't using them, I'm
removing them to keep things lean. We can always add them back if we
decide that we want them.

I also removed the require_tree directive from the application.js. While
this type of thing is convenient, it makes understanding which assets
you actually need more difficult, so I'd prefer to be explicit. Since it
wasn't including any resources after removing the empty
static_pages.js.coffee, removing this line should have no effect at this
time.

Change-Id: I9259073be0c3619e8daadce61a722f113aaced04
Remove boostrap JS from application JS manifest

We weren't using any tooltips or popovers, and this JS was causing
errors to be logged in the console anyway, so I'm removing it.

Change-Id: I4d8a8f195a31a46cfc5f13efb6f2b9a9a3465489
Enable Turbolinks

Turbolinks makes following links in your web application faster. Instead
of letting the browser recompile the JavaScript and CSS between each
page change, it keeps the current page instance alive and replaces only
the body and the title in the head.

This is a quick and easy drop-in speed improvement that should improve
the user experience. Since app is so simple it seems like it might be a
good fit. If we decide that we don't like it, it should be very easy to
roll back.

Change-Id: I55caafae20ab4640183ce62e7ac66016f68072da
Put page headers in .page-header element

This Boostrap component helps properly space out and segment sections of
content on a page.

More info:

  http://getbootstrap.com/components/#page-header

Change-Id: I2f62d5fc9fb41000303d3d79ab2a72a6dc21c36a
Use Boostrap thumbnail component for snapshot thumbnails

We may as well lean on this a little more for styles to help keep our
code simpler and things more consistent.

More info:

  http://getbootstrap.com/components/#thumbnails-custom-content

Change-Id: I60f2432d10737938dcbefb157418daac83cbc3d0
Tell Paperclip to use S3 in production
Make sure that all snapshot thumbnail cards are same height

We want each of these rows to be the same height because it is visually
cleaner. We can accomplish this easily with a couple of simple flexbox
styles.

Change-Id: I02d750e2a66b8e9de491ac94315c266814e8decd
Add aws-sdk gem

Apparently paperclip doesn't know how to do S3 otherwise.