Reverting threadsafe support - causes httpd to crash.  Asus will have to sort this out, I can't since bwdpi_sqlite is closed source.
Revert "sqlite3: re-enabled threadsafe support.  This fixes minidlna no longer supporting inotify-based updates.  I assume Asus disabled threadsafe support for performance reason - it is also used by the TrendMicro DPI engine."

This reverts commit 5789f9c24c956d4cc8997232254d23ba94017303.
Reverting the attempt at fixing the firewall rules that are flushed by the DPI engine since other things related to DPI are completely breaking the NAT loopback code - both mine and Asus's own).
Revert "dpi: when the closed-source DPI engine restarts, it flushes part of the iptables, breaking the NAT loopback and probably other things as well.  This is an attempt to reapply all firewall rules in those DPI restart calls I was able to intercept in the open-source parts.  Unsure if these are enough."

This reverts commit 4a431885671ee5c045d2a9985835127b1de42fd0.
firewall: revert to Asus's own NAT loopback for now - it's (only) partly broken at the moment, while ours doesn't work at all anymore
firewall: fixed incorrect GPL merge related to PPTPD CTF bypass, and ip6tables handling of new IPv6 connections on MIPS
firewall: synced formatting with GPL code for easier maintaining; fixed url filtering/keyword filtering support when CTF is enabled
firewall: re-added missing variable used by Asus's NAT loopback code
firewall: remove disabled code that was completely removed from GPL