librados: lockless get_instance_id()

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
librados: use rwlock for lookup pool, cache results

Use rwlock to read cahed results, only use regular lock if
results are not cached.
This is not perfect as it's never invalidated, which is a
problem with pool renaming.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>