Fix style editor on brewers that don't support codemirror.

Fixes issue GEOS-6620.  

https://jira.codehaus.org/browse/GEOS-6620

The browser detection code is adapted from the most recent version of Wicket: