Ported write_bridge_stats
Ported write_stats_files and fixed 2 tests
Ported check_descriptor (recheck_bandwidth is still inline)
Fixed wide lines
Ported check_port_forwarding
Changed how periodic events are handled.
No longer returning zero to keep interval. Functions are expected to always return their intended interval (or a time they want to be polled at).
Now if a precondition fails then it will be polled every second, e.g. servermode is enabled then all server events should be run in the next second.
Ported write_bridge_status_file and write_heartbeat