Add option to refresh metadata on a timer

Default to every 10 minutes to match behaviour of jvm reference implementation.

As discussed on #144