states: factor out common State constructor
states: factor out common State constructor

RyanTech/tchannel,sasa233/tchannel,chenwenbin928/tchannel,benfleis/tchannel,sasa233/tchannel,Zirpon/tchannel,hustxiaoc/tchannel,RyanTech/tchannel,i/tchannel,RyanTech/tchannel,hustxiaoc/tchannel,vanloswang/tchannel,i/tchannel,benfleis/tchannel,Zirpon/tchannel,chenwenbin928/tchannel,i/tchannel,vanloswang/tchannel,hustxiaoc/tchannel,bunnyblue/tchannel,Zirpon/tchannel,savaki/tchannel,sasa233/tchannel,bunnyblue/tchannel,bunnyblue/tchannel,chenwenbin928/tchannel,benfleis/tchannel,vanloswang/tchannel,savaki/tchannel,savaki/tchannel