Map browser event handler refactoring
Map browser event handler refactoring

This commit refactors the code of the map browser event handler. The changes are the following:

Previously the `handleTouch*_` listener functions handled both `touch*` and `mspointer*` events. With this commit we use per-event type listeners. This duplicates some code (could be avoidable), but makes it easier to introduce mouse/touch/pointer specific treatments in the future.

We now listen to pointermove, pointerup, touchmove and touchend only when needed. In this way we're assured that a `down` event was received (and that `this.down_` is set) when the `up` or `move` listeners are called. This fixes the bug @oterral reported on the mailing list: https://groups.google.com/d/msg/ol3-dev/jR844F7Nlg8/eN9dt4uATK0J.

To avoid problems in browsers that trigger different types of events (e.g. both mouse and pointer events) the `down` listeners unregister the other `down` listeners. For example, the `pointerdown` listener unregisters the `mousedown` and `touchstart` listeners, for ever.

NOAA-ORR-ERD/ol3,mzur/ol3,bogdanvaduva/ol3,aisaacs/ol3,alvinlindstam/ol3,aisaacs/ol3,pmlrsg/ol3,hafenr/ol3,bill-chadwick/ol3,elemoine/ol3,richstoner/ol3,tamarmot/ol3,stweil/ol3,tsauerwein/ol3,fperucic/ol3,denilsonsa/ol3,Andrey-Pavlov/ol3,gingerik/ol3,tsauerwein/ol3,CandoImage/ol3,freylis/ol3,ahocevar/ol3,elemoine/ol3,jmiller-boundless/ol3,ahocevar/ol3,Distem/ol3,tsauerwein/ol3,ahocevar/openlayers,Antreasgr/ol3,das-peter/ol3,pmlrsg/ol3,t27/ol3,bogdanvaduva/ol3,gingerik/ol3,geekdenz/openlayers,tschaub/ol3,antonio83moura/ol3,das-peter/ol3,wlerner/ol3,jmiller-boundless/ol3,richstoner/ol3,Morgul/ol3,tschaub/ol3,aisaacs/ol3,xiaoqqchen/ol3,llambanna/ol3,alvinlindstam/ol3,bartvde/ol3,bartvde/ol3,hafenr/ol3,llambanna/ol3,yinxiaomei/ol3,oterral/ol3,xiaoqqchen/ol3,fblackburn/ol3,jacmendt/ol3,thomasmoelhave/ol3,thhomas/ol3,adube/ol3,Antreasgr/ol3,alexbrault/ol3,bill-chadwick/ol3,jmiller-boundless/ol3,geekdenz/ol3,NOAA-ORR-ERD/ol3,elemoine/ol3,freylis/ol3,Andrey-Pavlov/ol3,planetlabs/ol3,Morgul/ol3,Andrey-Pavlov/ol3,tschaub/ol3,denilsonsa/ol3,tamarmot/ol3,thomasmoelhave/ol3,Distem/ol3,t27/ol3,bjornharrtell/ol3,adube/ol3,t27/ol3,epointal/ol3,mechdrew/ol3,Morgul/ol3,richstoner/ol3,jacmendt/ol3,bartvde/ol3,planetlabs/ol3,itayod/ol3,geonux/ol3,fperucic/ol3,yinxiaomei/ol3,openlayers/openlayers,itayod/ol3,ahocevar/openlayers,stweil/ol3,planetlabs/ol3,fredj/ol3,tamarmot/ol3,geekdenz/openlayers,fblackburn/ol3,bartvde/ol3,wlerner/ol3,geekdenz/ol3,landonb/ol3,klokantech/ol3,bill-chadwick/ol3,tamarmot/ol3,klokantech/ol3raster,epointal/ol3,alvinlindstam/ol3,klokantech/ol3raster,fredj/ol3,geonux/ol3,fblackburn/ol3,kkuunnddaannkk/ol3,fblackburn/ol3,mzur/ol3,pmlrsg/ol3,freylis/ol3,ahocevar/ol3,thhomas/ol3,wlerner/ol3,jacmendt/ol3,mechdrew/ol3,kjelderg/ol3,denilsonsa/ol3,stweil/ol3,openlayers/openlayers,kkuunnddaannkk/ol3,epointal/ol3,Distem/ol3,mzur/ol3,Antreasgr/ol3,CandoImage/ol3,thhomas/ol3,itayod/ol3,geekdenz/ol3,klokantech/ol3,geonux/ol3,NOAA-ORR-ERD/ol3,alexbrault/ol3,denilsonsa/ol3,ahocevar/openlayers,CandoImage/ol3,thhomas/ol3,stweil/openlayers,pmlrsg/ol3,Andrey-Pavlov/ol3,yinxiaomei/ol3,kkuunnddaannkk/ol3,elemoine/ol3,antonio83moura/ol3,mzur/ol3,gingerik/ol3,stweil/ol3,NOAA-ORR-ERD/ol3,llambanna/ol3,alvinlindstam/ol3,fredj/ol3,freylis/ol3,geonux/ol3,CandoImage/ol3,alexbrault/ol3,kkuunnddaannkk/ol3,landonb/ol3,klokantech/ol3raster,bogdanvaduva/ol3,wlerner/ol3,epointal/ol3,richstoner/ol3,planetlabs/ol3,ahocevar/ol3,klokantech/ol3,klokantech/ol3,kjelderg/ol3,yinxiaomei/ol3,stweil/openlayers,xiaoqqchen/ol3,jmiller-boundless/ol3,geekdenz/ol3,antonio83moura/ol3,itayod/ol3,xiaoqqchen/ol3,thomasmoelhave/ol3,llambanna/ol3,kjelderg/ol3,openlayers/openlayers,aisaacs/ol3,oterral/ol3,gingerik/ol3,oterral/ol3,bjornharrtell/ol3,Antreasgr/ol3,bogdanvaduva/ol3,hafenr/ol3,antonio83moura/ol3,stweil/openlayers,klokantech/ol3raster,fperucic/ol3,jacmendt/ol3,kjelderg/ol3,Distem/ol3,tschaub/ol3,jmiller-boundless/ol3,landonb/ol3,das-peter/ol3,fperucic/ol3,Morgul/ol3,bjornharrtell/ol3,alexbrault/ol3,geekdenz/openlayers,t27/ol3,landonb/ol3,bill-chadwick/ol3,adube/ol3,hafenr/ol3,thomasmoelhave/ol3,mechdrew/ol3,mechdrew/ol3,fredj/ol3,tsauerwein/ol3,das-peter/ol3