Merge pull request #1599 from dingpinglv/Iss3427_NewEventDispatcher

Issue #3427: cc.eventManager supports accelerometer events
issue #3935 Refactor some functions about array operation.
Merge pull request #1600 from SmallAiTT/CCGame_dev3.0

issue #3935 Refactor some functions about array operation.
Issue #3427: cc.eventManager supports keyboard events
Issue #3427: remove some unused codes from cc.inputManager
Merge branch 'develop-3.0' of https://github.com/cocos2d/cocos2d-html5 into Iss3427_NewEventDispatcher