Backport HeaderActionHook and HeaderDropdownActionHooks to 1.7.

Cherry-picks 33ed256007 from master, with the one small modification
whereby we use the old-style dropdown.png instead of &#9662; in the
templates. This is for consistency, since that's what 1.7 always
used for the dropdown marker.

Reviewed at https://reviews.reviewboard.org/r/4703/.