Add firewall functions and confchg functions

Also port cpg-confchg.sh test to use them.