JERSEY-2549: Singleton scoped Factory.dispose is not called
JERSEY-2574: @PreDestroy method is not invoked on Providers

 - fix + tests on client & server

Change-Id: Iee1de76c48a8699778a74eb0e7997d712c1edd6b
Signed-off-by: Michal Gajdos <michal.gajdos@oracle.com>
Merge "JERSEY-2549: Singleton scoped Factory.dispose is not called JERSEY-2574: @PreDestroy method is not invoked on Providers"