minimal fixes in clearBeforeUnload

The suggested changes prevent exceptions in case of usage `GridUnload` and recreating the grid with cached (saved in a JavaScript variable) old DOM element of previous grid.
small fixes suggested by JSLint
Merge branch 'master' of https://github.com/OlegKi/jqGrid into OlegKi-master

Conflicts:
	js/grid.pivot.js