fixes for lose jail database when change nodename: reported by Daniel Po...

...nticello; fix for ip node change: reported by Daniel Ponticello