commons: add a way to reset gauges and counters

Acked-by: Gerd Behrmann
Target: master
Require-book: no
Require-notes: no
srm: Fix a few IllegalStateTransition errors in srmLs

Besides supressing the errors, the code refactors state related
checks, renames the State#isFinalState method, and deletes the
static variant of the method (per reviewer request).

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6238/
srm: Improve logging on pin failure

Adds file name to log messages for pinning failures, avoids
duplicate error logging, and propagates authorization errors
back to the client.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6239/
ssh2: fix int overflow with timeout

As mina sshd used int as timeout value, max long
converted into negative number and ignored.

Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: no
info-provider: Fix regression in publishing GlueServiceEndpoint

Target: trunk
Request: 2.7
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6246/
srm-client: fix building of tagged RPMs

The master and 2.7 branches contain code to build the srm-client RPMs when
dCache has a "-SNAPSHOT" in the version (e.g., "2.7.0-SNAPSHOT").  The "-"
is illegal in the RPM name and the build-helper maven plugin is used to
remove it (to "2.7.0SNAPSHOT").

Tagged versions of dCache code do not contain the "-SNAPSHOT", so
the regexp in the build-helper maven plugin has nothing to replace.
Unfortunately, a failure to match results in the build process failing.

This patch fixes the problem by making the replacement optional.

Target: master
Request: 2.7
Requires-notes: no
Requires-book: no
Patch: http://rb.dcache.org/r/6242/
Acked-by: Gerd Behrmann