Double-Horizon Limit, AdS Geometry and Entropy Function