persist-state: Set the persist state fd to close-on-exec

The persist state file's file descript should not be leaked through to
sub-processes, so set the close-on-exec flag on it when opening it.

Reported-by: Evan Rempel <erempel@uvic.ca>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>