Fix #3700 and other syntax issues:

- Remove -G parameter from pfctl since it doesn't exist anymore
- Initialize $old_router
- Fix sh syntax on variable assign, it couldn't have space before =
- Simplify logic
- Avoid flush states twice, if it was done on IP change, don't do it
  again if router also has changed
Revert "Fix #3700 and other syntax issues:"

This reverts commit e912bfae186b6b657daf52607f9d027f46be0478.
Fix sh syntax