Speed up :func:`logging.getHandlerNames`.