Fixed pause event not correctly firing when a playing tab is closed.
Fixed resume delay not being used. Added preference window options.