Delete tests for deleted name_needles().

I'm not sure how the tests were passing.
Make macro and macro-ref searches work. Ref bug 1030312. Fix bug 1082100.

*This* is the last ref needle.

Rename args of ref_needles and qualified_needles to be more accurate and memorable.