Save window position when closed

Saves the user's last window position and restores it when they start Powder Toy again.  If there is no position saved or the saved position is off-screen, the window is centered on the nearest monitor.

Also, there was a minor bug when reading lowercase hexadecimal in TPTScriptInterface.