use onWindowFocusChanged(bool) instead of onResume()/onPause()

we should use onWindowFocusChanged(bool) to detect if the app is currently
visitible to the user or not. because onPause()/onResume() leads to false
positives on some android versions (e.g. Kindle Fire). if you lock those
devices, while the app running, everything is fine (onPause() is handled
properly). but as soon as you wake up the device, and the lock screen gets
visible, the app is resumed and the music is played (onResume() is
called to early).

this is a) not the best behaviour and b) such games will be rejected on the
samsung app store. onWindowFocusChanged(bool) is, like onPause()/onResume(),
available since API level 1 and it should be safe to simply switch.
Merge pull request #4 from cocos2d/master

Merge from the latest version of cocos2d
Added config macro for "spine" extension
pitch/pan/gain: added iOS/OSX impl, fixed compilation for all platforms.
CocosDenshion: (pitch/pan/gain) added Linux code for OpenAL and FMOD.
CocosDenshion: added effects customization for 7 platforms.

1. Pitch/pan/gain support on iOS, Mac, Linux+FMOD, Android+SoundPool;
2. Unified OpenAL code with pitch/pan/gain on Linux, Tizen, Blackberry,
Native Client;
3. Bug fixed: rewindBackgroundMusic() no longer stops music on unified
OpenAL engine.
4. Optional mp3 support for Linux+OpenAL (OPENAL_MP3 make option);
5. Pan/gain (not pitch) support for Android+OpenES.
6. Reorganized CocosDenshion tests in TestCpp.

Known issues:
1. No support for windows, emscrippten, marmalade.
2. No pitch effect on Android+OpenES. It requires backend redesign:
http://code.google.com/p/android/issues/detail?id=24592
Fixed coding style, rearranged CocosDenshionTest UI, changed
rewindBackgroundMusic to work with paused music.
issue #2129:remove prefix of types in ccTypes.h
issue #2129:fix conflicts
update to latest branch
Merge branch 'iss2129-remove_prefix' of https://github.com/minggo/cocos2d-x into minggo-iss2129-remove_prefix
Adds const to more getters

adds `const` to more getters.
issue #2129: Windows doesn't support 'initializer list', using constructor instead.
Merge pull request #10 from dumganhar/minggo-iss2129-remove_prefix2

issue #2129: Windows doesn't support 'initializer list', using constructor instead.
Merge pull request #3092 from ricardoquesada/more_const_love

issue #2373: Adds const to more getters
Merge branch 'iss2129-remove_prefix' of https://github.com/minggo/cocos2d-x into minggo-iss2129-remove_prefix
issue #2129:modify pkg files
issue #2129: Bug fix in "Color4B::Color4B(const Color4F &color4F)".
vertex --> getVertex, originalVertex --> getOriginVertex.
iss2129: bug fix in CCDrawNode.cpp