Refactor singleton api object into a class with constructor-scoped closures parameterized by baseUrl and getToken. Export backward- compatible api singleton, createApiClient factory for remote instances, and new instance.info() and users.verifyPassword() methods for federation support.