Added features from other forks and a dynamic delay feature.

- Merged additional features and fixes from forks up to 20131122
(xautolock, chrome flash and html5, firefox html5 and dpms fix)
- Added dynamic delay feature
- Cleaned up output