.gitattributes: specify the language used

Since we provide the ability to intelligently emit diff hunk headers
based on the programming language of each file, assuming that the
language is specified in .gitattributes, it makes sense to specify our
own language (cpp) in our own .gitattributes file.
diffcore-pickaxe.c: refactor regex compilation

In this file, two functions use identical blocks of code to call the
POSIX regex compiling function and handle a possible error. Here we
factor that block into its own function, in anticipation of using the
same code a third time.
diffcore-pickaxe.c: Refactor pickaxe_fn signature

This function type previously accepted separate regex_t and kwset_t
parameters, which conceptually go together. Here we create a struct to
encapsulate them, in anticipation of adding a third field that
pickaxe_fn's may require.

This parallels the existing diffgrep_cb structure for passing possibly
relevant values through to the callbacks invoked by xdi_diff_outf.
diff.c/diff.h: expose userdiff_funcname

The functionality of userdiff_funcname (determining the language in use
for a given file and setting up patterns to match "function names" in
that language) is useful outside of diff.c, so here we remove its static
specifier and declare it in diff.h.
diffcore-pickaxe.c: set up funcname pattern

We use userdiff_funcname to make the filetype-dependent function name
pattern available to pickaxe functions.
log: --function-name pickaxe

This is similar to the pickaxe grep option (-G), but applies the
provided regex only to diff hunk headers, thereby showing only those
commits which affect a "function" with a definition line matching the
pattern. These are "functions" in the same sense as with
--function-context, i.e., they may be classes, structs, etc. depending
on the programming-language-specific pattern specified by the "diff"
attribute in .gitattributes.

builtin/log.c:
	as with pickaxe, set always_show_header when using --function-name
diff.c:
	parse option; as with pickaxe, always set the RECURSIVE option
	for --function-name
diff.h:
	include "funcname" field in struct diff_options
diffcore-pickaxe.c:
	implementation of --function-name filtering (diffcore_funcname), like
	the existing diffcore_pickaxe_grep and diffcore_pickaxe_count
revision.c:
	as with pickaxe, set revs->diff to always generate diffs when
	using --function-name
xdiff: add XDL_EMIT_MOREFUNCNAMES to try harder finding function names

For filtering commits by function name, it's useful to identify the
function name in cases such as adding a new function to a file (where
the default functionality will not emit a function name in the hunk
header, because it isn't part of the context).

This adds a flag asking xdiff to be more aggressive in finding function
names to emit, and turns the flag on when the --function-name option is
in use.
xdiff: add XDL_EMIT_MOREHUNKHEADS to split hunks containing function lines

For filtering by function names, it's useful to split hunks whenever a
function line is encountered, so that each function name being deleted
or inserted gets its own hunk header (which then can be easily detected
by the filter).

This adds a flag, XDL_EMIT_MOREHUNKHEADS, which triggers this
nonstandard behavior, and enables it only in case the --function-name
option is being used.
t4213: test --function-name option

This test builds a sample C file, adding and removing functions, and
checks that the right commits are filtered by --function-name matching.
Documentation: Document --function-name usage