Refactor newer_than_local_pkg function.

Avoid sbuf pasting for comparing options, dependencies, shared libraries
of a local and a remote package.

Minor fix to make gcc happy about unused variable.