srm: Improve database initialization and shutdown

Fixes several problems:

- Move database initialization to the init-method to match what
  is cleaned up in the destroy-method (otherwise an instantiated
  but uninitialized SRM object would not shut down the db executors).

- Protect against resource leaks in case of initialization failure
  (if the init-method throws an exception, the destroy-method is
  not called).

- Avoid waiting twice during executor shutdown if the first wait
  timed out.

- Catch InterruptedException and set the interrupted flag on the
  current thread. This allows the rest of the shutdown to
  complete.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6804/