The indexes used in AttributeList's methods are very confusing. The
index used for the function was (unsigned) -1, return value 0, and the
arguments 1+. When iterating through indexes, we rely on unsigned
wrapping.
This changes the function index to 0, return value index to 1, and
arguments to 2+.
There are two places we have to keep the old indexes. One is the C API,
and the other is reading/writing bitcode for backwards compatibility.
If this breaks any downstream users, inspect calls to
*AttributeAtIndex() to see if they've hardcoded indexes.
clang-tidy: warning: invalid case style for function 'index_end' [readability-identifier-naming]
not useful