Adding locking for iptables resources to try to avoid segfaulting libiptc

This doesn't stop the segfaults but it's still good practice.