fix physical equality of subst
fix physical equality of subst

Summary:
`subst` should maintain physical equality when nothing has changed. this makes it much cheaper, since it doesn't allocate clones when nothing has changed.

see D3345856 for motivation.

Reviewed By: avikchaudhuri

Differential Revision: D4145874

fbshipit-source-id: fecdba1c6c1ee05b4e1ea2bffdea6a91b957d094

jamesgpearce/flow,nmote/flow,claudiopro/flow,JonathanUsername/flow,mroch/flow,TiddoLangerak/flow,fletcherw/flow,samwgoldman/flow,jamesgpearce/flow,MichaelDeBoey/flow,gabro/flow,nmote/flow,fletcherw/flow,fletcherw/flow,MichaelDeBoey/flow,claudiopro/flow,mroch/flow,popham/flow,gabro/flow,gabro/flow,JonathanUsername/flow,ForbesLindesay/flow,mroch/flow,mroch/flow,TiddoLangerak/flow,popham/flow,ylu1317/flow,claudiopro/flow,JonathanUsername/flow,samwgoldman/flow,facebook/flow,gabro/flow,JonathanUsername/flow,nmote/flow,facebook/flow,samwgoldman/flow,ylu1317/flow,ForbesLindesay/flow,AgentME/flow,gabelevi/flow,ForbesLindesay/flow,jamesgpearce/flow,facebook/flow,gabro/flow,popham/flow,ForbesLindesay/flow,AgentME/flow,MichaelDeBoey/flow,facebook/flow,JonathanUsername/flow,popham/flow,popham/flow,samwgoldman/flow,popham/flow,popham/flow,jamesgpearce/flow,mroch/flow,nmote/flow,gabelevi/flow,gabelevi/flow,gabelevi/flow,gabelevi/flow,mroch/flow,claudiopro/flow,TiddoLangerak/flow,mroch/flow,nmote/flow,AgentME/flow,nmote/flow,samwgoldman/flow,TiddoLangerak/flow,ylu1317/flow,facebook/flow,samwgoldman/flow,ForbesLindesay/flow,fletcherw/flow,jamesgpearce/flow,fletcherw/flow,ylu1317/flow,jamesgpearce/flow,claudiopro/flow,AgentME/flow,jamesgpearce/flow,TiddoLangerak/flow,ForbesLindesay/flow,gabro/flow,gabelevi/flow,samwgoldman/flow,MichaelDeBoey/flow,facebook/flow,AgentME/flow,gabelevi/flow,nmote/flow,ylu1317/flow,JonathanUsername/flow,fletcherw/flow,MichaelDeBoey/flow,JonathanUsername/flow,facebook/flow