Scott Wiener, a Democratic state legislator, says he can’t afford to keep deferring to Representative Nancy Pelosi.