Remove redundant `#update_counters!`

When snapshots for a sweep change, we call `Sweep#refresh!` to update
counters and perhaps send out an email if the sweep is done. In the code
that sends out the email, there was a redundant call to update the
counters again. This might be the reason to bug #83. I've removed the
redundant call and updated specs to be more like the live code - instead
of calling private methods directly, we call `#refresh!`.

There are a couple of redundant saves here too that I'm investigating
next.
Remove redundant `Sweep#save!`

When we were refreshing a sweep, we saved the sweep twice: once in
`#update_counters!` and once in `#send_email_if_needed!`. Since these
two actions are always combined in the `#refresh!` method, we don't have
to save more than one time.
Lock `Sweep#refresh!` to one thread at a time

A couple of bugs are indicating that there's a lot of race issues in
this method. My recent two commits have probably made it less likely
for these to happen but I wanted to follow up with something that has a
better potential of getting rid of the problem altogether.

I'm using a pessimistic block (`with_block`) to lock multiple threads
from calling `#refresh!` at once. I was first going to use a local
mutex, but since it is very likely that workers are run on more than one
machine, this wasn't going to scale. A database level lock should be
more robust and is exactly what `with_lock` gives us.

More on pessimistic locking:
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html
Make pending snapshots part of the sweep progress bar

Before, the progress bar wouldn't start showing anything interesting
until the first snapshot image had been taken. After this commit, it
will immediately go entirely gray and become active. I made this happen
by putting the pending count last in the list of stacked progress bars,
and changed the background color to gray. It now looks like the progress
bar is in an indeterminate state to begin with, which is better in my
opinion.
Fix rubocop lints and refactor `#sweep_progress_bar`

I had introduced some lints here before that I wanted to fix. These are
the changes I made:

- Changed from `#inject` to `#reduce`
- Fixed wrong indentation in one place
- Reordered some things for better readability
- Removed unnecessary guard for division by zero

Plus some other minor changes.