[hack] Added a check to decrease latest_heap_size
[hack] Added a check to decrease latest_heap_size

Summary:
Because in some cases the heap can naturally decrease without garbage collection, latest_heap_size can be set to an abnormally high value, preventing GC from happening again.
To fix this, we maintain a new invariant that the latest_heap_size must be at most the current used_heap_size. Thus, if the heap usage decreases after an oldify, latest_heap_size will also decrease, allowing garbage collection to occur again.

Reviewed By: dabek

Differential Revision: D3673343

fbshipit-source-id: 0948e95fb4b54da4ef6374e7323d68cf0afbec41

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