Make function-ref searches work. Ref bug 1082100.

* Emit qualnames for most references in the compiler plugin. This saves the whole SQL lookup dance we used to do in the pre-ES code.
* Add function-ref needles.
* Add a file for ref tests. We never really had those before. It's natural to do it in test_menus, because it already involves laying down every kind of ref.
Abstract the needle-making a bit. Ref bug 1082100.

Now we have something akin to name_needles().
Replace dashes in ES field names with _.

I never meant to introduce another naming convention. Let's stick with under_scores, since they're valid Python symbols and valid JS property names.
Make type and type-ref searches work. Ref bug 1082100.

* Unskip a bunch of tests; woo!
* Add qualnames to type needles. type_needles() didn't have those.
* Lay down "type" needles for typedefs rather than "typedef" ones. The name_needles() call was doing the wrong thing.