Add restore_history_before on ModelSQL

issue4259
review6601003

--HG--
extra : rebase_source : 59d0d707adbd9efea69581f6eff3ee2618fba9c9
Make decistmt a tool

issue4273
review9801002