Clarify what licences apply where

This doesn't change any license, just clarifies what's licensed under
LGPL and what's under GPL.
testsuite: add tests for array implementation
Do not export array of kmod extensions

The only user outside of libkmod-util is depmod, which really only needs
to get the string for the extension of uncompressed modules. It doesn't
need to access the array itself.
Do not rely on prio_to_str() being always inline

This function was declared as always-inline so there was not really a
problem in returning prioname, that could possibly point to the local
buf[] variable.

However static analysis tools are often confused about this and being
always-inline was just a workaround to make it work.

So, let's move the buffer to the caller. We have only 2 callers so it
doesn't matter much. This always reduce the size of log.o, since now the
function is not inlined anymore. Below is the size for "-g -O2" with
gcc:

before:
   text    data     bss     dec     hex filename
   1325       4       1    1330     532 tools/log.o

after:
   text    data     bss     dec     hex filename
   1171       4       1    1176     498 tools/log.o
Move alias_normalize() to shared
depmod: use alias_normalize() from shared

Remove underscores2() function which is essentially the same as
alias_normalize() and the latter, which is now in shared/.
Move remaining functions from libkmod-util to shared
build-sys: rename libkmod-util convenience library

Now that all source code from libkmod-util has been moved to shared/
directory, rename also the convenience library to libshared.
Log error on failed underscores(), moving it to shared/

Move underscores() to shared/. It's the same as alias_normalize(), but
it rather operates in place, with the same string being passed.

The difference now that it's in shared/ is that it's a non-logging
function.

This makes us a little bit more verbose: we don't accept partially
correct module and aliases names in kcmdline and in configuration files.
We log an error instead.
Change parameter from int to char

It's a char not an int.
libkmod: remove unused inline functions

libkmod/libkmod-list.c:39:33: warning: unused function 'list_node_next' [-Wunused-function]
static inline struct list_node *list_node_next(const struct list_node *node)
                                ^
libkmod/libkmod-list.c:47:33: warning: unused function 'list_node_prev' [-Wunused-function]
static inline struct list_node *list_node_prev(const struct list_node *node)
                                ^

It doesn't really matter in the end result since the compiler won't
generate any code for it. But let's keep it clean. It wasn't needed
until now, so probably it won't be anymore.
Move static keyword to DEFINE_TEST macro
testsuite: use a section to put tests in instead of array

Intead of having to declare an array of tests, tweak the definition of
DEFINE_TEST and TESTSUITE_MAIN so they know the tests are put in a
particular section of the ELF file.

This avoids the mistake of adding a test and forgetting to add it to the
array. Now once a test is defined, it's ready to run, so one less step
to define new tests.

The removal of the arrays is left for another patch so not to clutter
the diff on this one.
testsuite: remove now unused array of tests

Remove the arrays and let each test with a guaranteed unique name.
Move strbuf implementation to shared/

Just move the strbuf-like implementation to shared/. No renames were
made yet to avoid cluttering the diff. It will come in a separate patch.
shared: rename prefixes of strbuf functions

Use strbuf_ prefix instead of buf_.
testsuite: add tests for strbuf
strbuf: reduce default buffer size

Using 2048 as buffer sizer for strbuf is a bit exaggerated. strbuf is
used much more when we are not using mmapped indexes, but it's used for
mmapped when for example searching for an alias. A quick and dirty hack
to output the size of our strbufs is to print buf->used inside
strbuf_str(). Doing this and creating some statistics with:

while read xxx alias xxx; do
    tools/modprobe -R "$alias" > /dev/null;
done < /lib/modules/$(uname -r)/modules.alias 2>&1 | \
	     Rscript -e 'summary (as.numeric (readLines ("stdin")))'

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
   1.00   29.00   31.00   31.55   38.00   92.00      26

So, reduce the step to 128, which is still greater than the maximum in
these cases. In the worst case this can only create a few calls to
realloc(), while keeping the memory footprint low for the common cases.
strbuf: do not calculate next step in size on all calls

We only need to check if the new size is less or equal than the current
size. We don't really need to calculate the next step.
strbuf: make strbuf_pushchars() a little less dumb

Do not push one char at a time. We have strlen() and memcpy() to rely
on.