attr: map builtin userdiff drivers to well-known extensions

We already provide sane hunk-header patterns for specific
languages.

However, the user has to manually map common extensions to
use them. It's not that hard to do, but it's an extra step
that the user might not even know is an option. Let's be
nice and do it automatically.

It could be a problem in the future if the builtin userdiff
drivers started growing more invasive options, like
automatically claiming to be non-binary (i.e., setting
diff.cpp.binary = false by default), but right now we do not
do that, so it should be safe. To help safeguard against
future changes, we add a new test to t4012 making sure that
we don't consider binary files as text by their extension.

We also have to update t4018, which assumed that without a
.gitattributes file, we would receive the default funcname
pattern for a file matching "*.java". This is not covering
up a regression, but rather the feature working as intended.

The list of extensions was compiled from suggestions on the
mailing list; notably missing are C/C++, which are reported
to have poor xfuncname patterns. Specifically, suggested but
omitted were:

	*.c diff=cpp
	*.cc diff=cpp
	*.cxx diff=cpp
	*.cpp diff=cpp
	*.h diff=cpp
	*.hpp diff=cpp