use session_write_close() to allow loading of a second page while waiting

use session_write_close() to allow loading of a second page while the first is 'waiting' for a long action. (for example while performing 10 ping's on diagnostics page, you cannot load another page without this change)
also seams to be beneficial for when the WAN is down, pfSense sometimes used to be quite unresponsive...

for possible 'conflicts' a variable DONT_CLOSE_SESSION can be set to stop this new behavior