NYC buildings commissioner quits amid criticism