add -gx to add stack smash code

With -gx switch, adds code to smash the local variables upon function exit. Useful for flushing out heisenbugs.

A partial implementation of bug http://d.puremagic.com/issues/show_bug.cgi?id=9242