Be a little less permissive about reference saving

Migrated issue

Reported by: jhodgdon

This is a quick follow-up to #1405914: Make code link/reference creation more orderly and rational

I think it is potentially saving too many "potential hook" et al references. It should only add them if they match the "this is potentially a function name" regular expression.

This should just reduce the size of the database slightly to eliminate things that should never be matched in this table. I don't expect it to change the functionality at all.