Initial import of elftoolchain r2974.

Obtained from:	elftoolchain.org
Copy libelf, libdwarf and common files from vendor/ to contrib/.
Removed source code for the old libelf and build the new libelf from
contrib/ instead.
Set CFLAGS in just one line.
Use FreeBSD's ELF headers instead of the elfdefinitions.h header which
comes with elftoolchain. This version of libelf doesn't need to be
portable; using FreeBSD's own ELF headers will avoid conflicts and
make integration easier.
Define SHT_GNU_LIBLIST and R_MIPS_64, which is needed for libelf and
libdwarf.
Remove the old libdwarf and bring in the new libdwarf in contrib/.
Convert ctfconvert to use the new libdwarf API.
If function die_name() finds a DIE without a name, set its name to
"__anon__". This hack is used to workaround a issue that compilers
like GCC could generate DW_TAG_base_type DIE without a name.

Note that we didn't need this before because the old libdwarf
internally set all the unnamed DIE's name to "__anon__".
We should not set the unnamed DIE's name to "__anon__" since that will
bring back a known issue with DTrace regarding type name
comparison. Instead, we can set the name to an empty string.

Pointed out by:	     avg
Apply r241720 by ed:

Fix warnings found by -Wmising-variable-declarations.
Fix a warning in libdwarf found by -Wmissing-variable-declarations.
Fix typo: the public API dwarf_child() should return DW_DLV_NO_ENTRY
instead of DW_DLE_NO_ENTRY when a child DIE is not found.
API dwarf_attrval_flag() should properly handle an attribute with
(DWARF4) form DW_FORM_flag_present which implicitly indicates the
presence of the attribute. Manual page is updated to reflect this
change.

Note that this was previously fixed in the old libdwarf.
Add a sanity check: The provided offset for the desired location list
should not exceed the size of the .debug_loc section.
* Allow API dwarf_loclist_n() and dwarf_loclist() to be called with
  attributes that have form DW_FORM_sec_offset.
* If the .debug_info section conforms to DWARF4, do not allow the value
  of attributes with form DW_FORM_data[48] to be used as section
  offset.
* Make die_mem_offset() be able to handle DW_AT_data_member_location
  attributes generated by Clang 3.4.
* Document how different compilers generate DW_AT_data_member_location
  attributes differently.
* Document the quirks about DW_FORM_data[48].
Clang 3.4 will sometimes emit DIE for struct/union member before
emitting the DIE for the type of that member. ctfconvert can not
handle this properly and will calculate a wrong member bit offset.
Same struct/union type from different .o file will be treated as
different types when their member bit offsets are different, and
gets added/merged multiple times. This will in turn cause many other
structs/pointers/typedefs that refer to the duplicated struct/union
gets added/merged multiple times and eventually causes numerous
duplicated CTF types in the kernel.debug file.

The simple workaround here is to make use of DW_AT_byte_size attribute
of the member DIE to calculate the bits occupied by the member's type,
without actually resolving the type.
MFH@260917.
Fix build: include sys/queue.h header explicitly since the gelf.h
header comes with the new libelf will no longer include sys/queue.h.