add strnncmp() function

Add a strnncmp() function which behaves like strncmp() except it uses
the length of both strings instead of just one.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
tree-walk: simplify via strnncmp()

Simplify tree-walk.c using the strnncmp() function and remove the
name_compare() function.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
unpack-trees: simplify via strnncmp()

Simplify unpack-trees.c using the strnncmp() function and remove the
name_compare() function.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>