wipe views before foundation database code is executed

See https://github.com/xtuple/xtuple/pull/1774#issuecomment-54475026
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach