Add retry logic and lazy connect

This adds connection and API call retries to the metastore client. API calls that fail because of a TTransportException can be retried.