Replace AHC use with httpclient, though this is once again missing query-string params
NEXUS-5354: Deadlock fix

sync access and locks were causing a deadlock. Now, sync method
access is removed, and same is done using lock (synced access
guaranteed by exclusive lock).
NEXUS-5354: Undoing retry change

Blah
Merge branch 'master' into rrb-using-httpclient

Conflicts:
	nexus/nexus-core-plugins/nexus-rrb-plugin/src/main/java/org/sonatype/nexus/plugins/rrb/RemoteBrowserResource.java
	nexus/nexus-core-plugins/nexus-rrb-plugin/src/test/java/org/sonatype/nexus/plugins/rrb/MavenRepositoryReaderTest.java
	nexus/nexus-proxy/src/main/java/org/sonatype/nexus/proxy/storage/remote/httpclient/HttpClientUtil.java
NEXUS-5354: Improving fix, applied comments

Changes:
* isIndexerHealthy made thread safe and improved (not using monitoring methods but real thing)
* persistor protected against concurrent writes to same file
* smaller fixes, cleanups.
NEXUS-5354: Fix for concurrency issue

With previous fix, it was possible that 2nd thread trying to repair,
that was being blocked during the repair, would try to also repair an
already repaired index.

Now, indexer will not only blow with IOEx, but will also flag itself as
stopped, and check is added to repair only if indexer is stopped. Hence,
the 2nd thread from above will not do anything.
Merge branch 'master' into rrb-using-httpclient
fix bad merge
Add javadoc.  Add null checks + final params.  Add helper getQueryString(ProxyRepository)
Refactor RRB to use HttpClient and handle QueryString junk.  Pending updating the tests.
Bring back non-final ProxyRepo I don't feel like refactoring tests for this and update tests.
Merge branch 'master' into rrb-using-httpclient

Conflicts:
	nexus/nexus-core-plugins/nexus-rrb-plugin/pom.xml
Fix TreePanel root node title
Remove unused js bits
Ignoring UT

This UT is known to fail, as a result of merging in the Security
REST API, and conflict about emailer. This single UT requires "living"
security emailer, why other UTs requires "mock" one.
Fixes needed for proper runtme deps

Due to move of REST API into a plugin, test classpath
left incomplete. Due nexus plugins, the scope is
provided, but as such, all the provided deps (otherwise in core)
are not coming in transitively, hence, runtime classpath
(in this case for UTs/ITs only) are incomplete.

Fix was to add dependency to nexus-web-utils, where needed
classes reside, but also it will pull in needed shiro
deps (most typically shiro-web) that is in core, but the
plugin in question (like rrb or ldap) has no and should
have no knowledge or dependency decleared on them directly,
as they are runtime, indirectly needed dependencies for
security to work.
Updates needed as REST is in plugin now.

Changes:
* IT helper plugin must specify plugin type correctly, to have correct metadata (crack on runtime otherwise)
* javax.ws.rs exported from restlet1x plugin, as is needed by resources using ResourceSupport

As for 2nd change, the reasoning is that I HOPE that no plugin will declare dep on
two restlet plugins (like restlet1x and siesta) at the same time, and cause classloader
issues.
Nexus IT Helper plugin is right now 2.3 only

So not running it with older Nexuses until we sort this out.
Tuning legacy ITs for changes in restlet1x

Now that restlet is not in core anymore, it needs to be (actually
it was) pulled in as dependency, but this time, as packaging is
changed, has to be specified as any other plugin.
Remove dead code