Tuple element extraction functor.

A handy functor to extract the specified element from a tuple, for
example to use in std::transform.
Exception simplification.

Useless io_error_t was dropped completely in favor of std::system_error,
some missed exceptions are now handled during the bootstrap.
Catch only missing cache exceptions.

Cached objects should only handle missing cache storage exceptions,
other stuff like broken caches should be propagated.
RPC system throws std::system_error only.
API system throws repository_error_t only.
Narrow exception types in try-catch blocks.

Instead of throwing vague 'everything is broken' and catching
everything, try to narrow the required types in the exception handling
code.
Do not allow low-level errors to propagate.

Instead of throwing socket errors all the way up to the services, try to
catch them inbetween and rethrow a more meaningful exception.
Fix a wrong exception type.