Update detect-zoom.js

much faster for long run.
only detects the browser once.
added initial state.
added detect function.