PhoneGap: Improve resume support

Also fixed timer check against current page