HOOK_QUERY_HEADLINES

These are the changes to add HOOK_QUERY_HEADLINES.  An example plugin is included with comments explaining the hook.