bring protocols on NAT edit page more in line with rule edit page
Only include a scheduled rule if it is strictly before the end time

The exact moment of the end time is the end of the schedule. We do not want to include a rule when filter_configure_sync wakes up at 00:15:00 etc and is on a not-slow system that processes this code during the interval 00:15:00 to 00:15:01. This should help intermittent issues with schedules not finishing at the appropriate 15-minute boundary. Might help or fix #3558
Fix indent and whitespaces
Make sure single quotes are encoded and avoid javascript injection
Fix status_rrd_graph_img.php and also improve it:

- Remove escapeshellarg that broke command line
- Only remove dangerous chars to avoid command injection
- Replace all `hostname` calls by php_uname('n')
- Replace all `date` calls by strftime()
- Add $_gb to collect possibly garbage from exec return
Remove more backticks
Remove also . and / from graph
Add full path for dmesg and replace backtick by exec
Add -n for 2 remaining sysctl calls, also replace backtick by exec
Remove more backtick abuse
Replace some backticks by exec ans simplify commands
Merge pull request #1218 from razzfazz/nat_add_missing_protocols_master
Remove extra data after space and fix pf rule syntax. It should fix #3688
Merge pull request #1239 from phil-davis/patch-9
Add local/www to the list of directories that needs to be symlink'd to reduce PBI differences between 2.1 and 2.2