BandwidthController: fixup insertion pos in costly chain handling

* Long time ago, setting an alert in a costly_<iface> chain required adding
it just before the ACCEPT rule that was at the end.
But since then the ACCEPT rule has been removed.
This would cause the insert to pick the last position no matter what.
Now we just append.

* A naughty app in the penalty box could waste up quota on packets that would
get dropped in the later penalty_box rule.
Now we check the penalty_box before feeding it to the quota.

Change-Id: Id4b6a7c020583f1cccc7dccde34c4b85d0fd9642
diff --git a/BandwidthController.h b/BandwidthController.h
index 9e23b76..b4a2c20 100644
--- a/BandwidthController.h
+++ b/BandwidthController.h
@@ -97,7 +97,7 @@
     };
 
     enum IptIpVer { IptIpV4, IptIpV6 };
-    enum IptOp { IptOpInsert, IptOpReplace, IptOpDelete };
+    enum IptOp { IptOpInsert, IptOpReplace, IptOpDelete, IptOpAppend };
     enum IptRejectOp { IptRejectAdd, IptRejectNoAdd };
     enum NaughtyAppOp { NaughtyAppOpAdd, NaughtyAppOpRemove };
     enum QuotaType { QuotaUnique, QuotaShared };
@@ -169,7 +169,6 @@
     static const char *IPT_BASIC_ACCOUNTING_COMMANDS[];
 
     /* Alphabetical */
-    static const int  ALERT_RULE_POS_IN_COSTLY_CHAIN;
     static const char ALERT_GLOBAL_NAME[];
     static const int  MAX_CMD_ARGS;
     static const int  MAX_CMD_LEN;