Black hole microstates and supersymmetric localization