unbound_statistics section should be written to unbound.conf
The stuff generated by unbound_statistics() goes into unbound.confIt had got separated out and was going nowhere. This puts the behavior back the way it was yesterday.
Note: There is a separate issue about this because the UI has no place to actually select the statistics settings. There is some upgrade code that looks like it was converting statistics settings from the old Unbound package into custom commands in the integrated Unbound. So it looks like the unbound_statistics() function can/should be removed???
Add global so that unbound.conf gets written
to the correct place based on $g setting.
Rearrange calls in unbound.inc so config text can be generated without writing the actual file and a syntax check can be run. Rearrange services_unbound.php to wait until input checking is complete before saving things to global config and run syntax check as part of input checking. Implements #4411.
Check unbound root.key file contents, and remove it if invalid, before unbound-anchor runs otherwise it will fail and unbound will fail to start. fsync the file after writing to prevent the problem. Ticket #5334
Move main pfSense content to src/