ded/bowser — pull request #48 by BendingBender (2014-02-28 22:21:15+00:00)
Title: Refactor duplications, add sailfish, prevent executing all regex matching upfront

Hi, this PR combines different changes, most notably:
* made best effort to not do things multiple times
* moved regex matching into if/else branches instead of doing all matching upfront to prevent unneeded regex execution if we already could identify a browser
* moved checks for more common devices up in the if/else chain, and the less common ones down in the chain, as far as it was actually possible without breaking detection
* added `sailfish` flag for sailfish os browser, removed `mozilla` flag which was mirroring the `gecko` flag