Store full tenant objects in exported credentials

exportCredentials() was using the deprecated getTenant() method which
only returns a numeric tenant ID. When importCredentials() attempted to
re-import this using setTenant() it would re-query the tenant using a
HEAD request to the tenant object. This reduces the effectiveness of
credential caching as importing credentials requires an unconditional
HTTP request

Instead switch importCredentials()/exportCredentials() to use
getTenantObject()/setTenantObject() respectively. Change the cache key
from 'tenant' to 'tenantObj' to prevent errors when attempting to
import older credentials.