Validate window dimensions

Because of atom/atom-shell#473 there are invalid window dimensions in the serialized state for people using Atom on Windows.

Instead of bumping the version and throwing away the bad state, I'd rather just validate the dimensions on save/restore so that the Atom window is never shown off screen.

This PR adds two checks before using the dimensions, height and width greater than 0 and that the window isn't completely offscreen by checking if x+width and y+height are both greater than 0.

Closes #2872