Use %u in sprintf when printing unsigned integers

This fixes the following messages of cppcheck:

[src/modules/rlm_eap/libeap/eapcrypto.c:108]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src/modules/rlm_eap/libeap/eapcrypto.c:119]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src/modules/rlm_eap/libeap/eapcrypto.c:126]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src/modules/rlm_eap/libeap/eapcrypto.c:133]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src/modules/rlm_detail/rlm_detail.c:236]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
Removed some unused variables

This fixes the following messages of cppcheck:

[src/modules/rlm_sql/drivers/rlm_sql_freetds/rlm_sql_freetds.c:290]: (style) Variable 'ret' is assigned a value that is never used.
[src/modules/rlm_sql/drivers/rlm_sql_freetds/rlm_sql_freetds.c:492]: (style) Variable 'ret' is assigned a value that is never used.
[src/modules/rlm_sql/drivers/rlm_sql_freetds/rlm_sql_freetds.c:573]: (style) Variable 'ret' is assigned a value that is never used.
[src/modules/rlm_passwd/rlm_passwd.c:284]: (style) Variable 'len' is assigned a value that is never used.
Removed assignment of function parameter at the end of function

This fixes the following message of cppcheck:

[src/main/tmpl.c:826]: (warning) Assignment of function parameter has no effect outside the function.
Dereference query pointers before checking to see if they're empty

This effectively did a check to see if the pointer was NULL, exactly what we did in the LHS of the and operator.

This fixes the following messages of cppcheck:

[src/modules/rlm_sql/rlm_sql.c:638]: (warning) Char literal compared with pointer 'inst.config.authorize_group_check_query'. Did you intend to dereference it?
[src/modules/rlm_sql/rlm_sql.c:675]: (warning) Char literal compared with pointer 'inst.config.authorize_group_reply_query'. Did you intend to dereference it?
Use *= 2 instead of += $self for doubling

The generated code is slightly more efficient too (unless you consider compiler optimizations)

This fixes the following message of cppcheck:

[src/modules/rlm_unbound/rlm_unbound.c:157]: (style) Same expression on both sides of '+='.
Fixed check in pairvalidate

The only commit in this series that actually changes some behaviour. The test was supposed to check if one of the values (match and check) was false, while the other was true. Because the while loop already validated that at least one of them is true, we can get the desired behaviour by just checking if one of them is false. The old behaviour only tested to see if match was false.

This code is not tested in the unit tests. It would be nice to have it in there, but I've got no idea how to write that.

This fixes the following message of cppcheck:

[src/lib/valuepair.c:547]: (style) Same expression on both sides of '||'.