Do not leak mem if hook is already present.

From Repolho <repolho at zoho dot com>, thanks!
Free buffer used to read history file.

From Repolho <repolho at zoho dot com>, thanks!
In cmd_sfrestore don't pass screen number to frestore.

Noticed by Repolho <repolho at zoho dot com>, who came with a similar
fix.
Better variable names in cmd_sfrestore
Remove useless/untrue comments in cmd_sfrestore.
Consistent formatting in cmd_sfrestore.
Cleanup cmd_sfdump.

Better variable names, more readable formatting.
Use a fixed buffer for the screen number appended to each frameset.
Plug leak in cmd_sfrestore.

Noticed by Repolho <repolho at zoho dot com>, who came with a different
fix.