Tighten up @objc optional near-miss detection heuristics.
The @objc optional requirement near-miss heuristics were too
permissive, and could occasionally produce ridiculous results that
were nowhere close to a "near" miss. Make the diagnostics more
conservative, and fix an issue with an errant sentinel value.
Fixes rdar://problem/26380688.
(cherry picked from commit 77942d37d58e7f029f959aa5bfb79f66c73247a4)