Add ability to prune branches from state file


Without pruning, the state file will grow quite large over time.
Add a parameter to allow pruning of all or some branches from the
state file to minimize this issue.

Change-Id: I61155f4aa11a36bfd6da151173fb0b694fc7103a
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
commitee0c74b9bde5b9f1db15f7b1f377d353343c2192
parentdb949f5bc4f78726479d3f61866315939b1d9a9a
authorDaniel Smith <daniel.smith@qt.io>
committerDaniel Smith <Daniel.Smith@qt.io>
commit timeMon, 17 Apr 2023 09:23:19 +0000