Handle iOS audio interruption

Fixes #2285
Updated version of #2938, based on the comment of @MarkoBL
Tested on iOS 7.1 and 8.1.

Note: It gives a couple of warnings as AudioSession has been replaced with AVAudioSession, but using AVAudioSession doesn't work.