added statistics functions and input validation checks to ipsec pool