Sync the deprecation formatter file to avoid odd duplicate lines.

When upgrading a project at work, I observed *lots* of duplicate
lines winding up in the deprecation file, even though the
`deprecation_stream.puts` line was only hit a small number of times.
Setting `sync = true` (while debugging the issue) was observed to
fix the problem.  No idea why :(.
Don't print duplicate deprecation messages.

When a spec suite uses a helper method that is called
from a global `before` hook and calls a deprecated method,
we only need one deprecation message in our output,
not one per spec.

Note that this only limits *identical* deprecation messages.
The same deprecation from multiple call sites will still
each get printed.

Fixes #1151.
Add `require 'set'`.

Since this file depends on it.
Merge pull request #1159 from rspec/fix-duplicate-deprecations-2-99

Fix duplicate deprecations 2 99