several fixes and changes in one:  * be careful to null out pointers after freeing what they point to.  * be careful to zero newly alloced memory  * misc whitespace changes for reaability.
several fixes and changes in one:
 * be careful to null out pointers after freeing what they point to.
 * be careful to zero newly alloced memory
 * misc whitespace changes for reaability.


git-svn-id: fc35eccb03ccef1c432fd0fcf5295fcceaca86a6@23087 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6

MadBomber/link-grammar,opencog/link-grammar,opencog/link-grammar,opencog/link-grammar,MadBomber/link-grammar,linas/link-grammar,MadBomber/link-grammar,ampli/link-grammar,MadBomber/link-grammar,opencog/link-grammar,ampli/link-grammar,ampli/link-grammar,linas/link-grammar,linas/link-grammar,linas/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,MadBomber/link-grammar,linas/link-grammar,ampli/link-grammar,ampli/link-grammar,MadBomber/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,MadBomber/link-grammar,ampli/link-grammar,linas/link-grammar,MadBomber/link-grammar,opencog/link-grammar