Improvements, prevent concurrent request to underling query.

Warning:  the API has changed
Fix cache timeout to new API

new API is in milliseconds instead of seconds.
(to facilitate unit testing)
Add explicit timeout to gen_server:call
Accept {Fun,Args} as retrieval functions too