Add -zapwallettx function, a diagnostic tool to assist in wallet repair

DANGER, FOOLS:  This is untested.